156 lines
5.9 KiB
XML
156 lines
5.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.gxwebsoft.think.mapper.ThinkCardMapper">
|
|
|
|
<!-- 关联查询sql -->
|
|
<sql id="selectSql">
|
|
SELECT a.*
|
|
FROM think_card a
|
|
<where>
|
|
<if test="param.id != null">
|
|
AND a.id = #{param.id}
|
|
</if>
|
|
<if test="param.sid != null">
|
|
AND a.sid LIKE CONCAT('%', #{param.sid}, '%')
|
|
</if>
|
|
<if test="param.uid != null">
|
|
AND a.uid = #{param.uid}
|
|
</if>
|
|
<if test="param.vid != null">
|
|
AND a.vid = #{param.vid}
|
|
</if>
|
|
<if test="param.aid != null">
|
|
AND a.aid = #{param.aid}
|
|
</if>
|
|
<if test="param.wechatOrder != null">
|
|
AND a.wechat_order LIKE CONCAT('%', #{param.wechatOrder}, '%')
|
|
</if>
|
|
<if test="param.code != null">
|
|
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
|
</if>
|
|
<if test="param.name != null">
|
|
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
|
</if>
|
|
<if test="param.username != null">
|
|
AND a.username LIKE CONCAT('%', #{param.username}, '%')
|
|
</if>
|
|
<if test="param.phone != null">
|
|
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
|
</if>
|
|
<if test="param.price != null">
|
|
AND a.price = #{param.price}
|
|
</if>
|
|
<if test="param.desc != null">
|
|
AND a.desc LIKE CONCAT('%', #{param.desc}, '%')
|
|
</if>
|
|
<if test="param.info != null">
|
|
AND a.info LIKE CONCAT('%', #{param.info}, '%')
|
|
</if>
|
|
<if test="param.discount != null">
|
|
AND a.discount = #{param.discount}
|
|
</if>
|
|
<if test="param.count != null">
|
|
AND a.count = #{param.count}
|
|
</if>
|
|
<if test="param.eachMoney != null">
|
|
AND a.each_money = #{param.eachMoney}
|
|
</if>
|
|
<if test="param.remainingMoney != null">
|
|
AND a.remaining_money = #{param.remainingMoney}
|
|
</if>
|
|
<if test="param.number != null">
|
|
AND a.number = #{param.number}
|
|
</if>
|
|
<if test="param.num != null">
|
|
AND a.num = #{param.num}
|
|
</if>
|
|
<if test="param.status != null">
|
|
AND a.status = #{param.status}
|
|
</if>
|
|
<if test="param.term != null">
|
|
AND a.term = #{param.term}
|
|
</if>
|
|
<if test="param.month != null">
|
|
AND a.month = #{param.month}
|
|
</if>
|
|
<if test="param.type != null">
|
|
AND a.type = #{param.type}
|
|
</if>
|
|
<if test="param.cardType != null">
|
|
AND a.card_type = #{param.cardType}
|
|
</if>
|
|
<if test="param.vipType != null">
|
|
AND a.vip_type = #{param.vipType}
|
|
</if>
|
|
<if test="param.pic != null">
|
|
AND a.pic LIKE CONCAT('%', #{param.pic}, '%')
|
|
</if>
|
|
<if test="param.prices != null">
|
|
AND a.prices LIKE CONCAT('%', #{param.prices}, '%')
|
|
</if>
|
|
<if test="param.payType != null">
|
|
AND a.pay_type = #{param.payType}
|
|
</if>
|
|
<if test="param.isIntegral != null">
|
|
AND a.is_integral = #{param.isIntegral}
|
|
</if>
|
|
<if test="param.isInvoice != null">
|
|
AND a.is_invoice = #{param.isInvoice}
|
|
</if>
|
|
<if test="param.expireTime != null">
|
|
AND a.expire_time = #{param.expireTime}
|
|
</if>
|
|
<if test="param.urgentName != null">
|
|
AND a.urgent_name LIKE CONCAT('%', #{param.urgentName}, '%')
|
|
</if>
|
|
<if test="param.urgentPhone != null">
|
|
AND a.urgent_phone LIKE CONCAT('%', #{param.urgentPhone}, '%')
|
|
</if>
|
|
<if test="param.cardNum != null">
|
|
AND a.card_num LIKE CONCAT('%', #{param.cardNum}, '%')
|
|
</if>
|
|
<if test="param.password != null">
|
|
AND a.password LIKE CONCAT('%', #{param.password}, '%')
|
|
</if>
|
|
<if test="param.useTime != null">
|
|
AND a.use_time = #{param.useTime}
|
|
</if>
|
|
<if test="param.createTimeStart != null">
|
|
AND a.create_time >= #{param.createTimeStart}
|
|
</if>
|
|
<if test="param.createTimeEnd != null">
|
|
AND a.create_time <= #{param.createTimeEnd}
|
|
</if>
|
|
<if test="param.timeStart != null">
|
|
AND a.create_time >= #{param.timeStart}
|
|
</if>
|
|
<if test="param.timeEnd != null">
|
|
AND a.create_time <= #{param.timeEnd}
|
|
</if>
|
|
<if test="param.idcard != null">
|
|
AND a.IDCard LIKE CONCAT('%', #{param.idcard}, '%')
|
|
</if>
|
|
<if test="param.remark != null">
|
|
AND a.remark LIKE CONCAT('%', #{param.remark}, '%')
|
|
</if>
|
|
<if test="param.keywords != null">
|
|
AND (a.username = #{param.keywords}
|
|
OR a.phone = #{param.keywords}
|
|
OR a.code = #{param.keywords}
|
|
)
|
|
</if>
|
|
</where>
|
|
</sql>
|
|
|
|
<!-- 分页查询 -->
|
|
<select id="selectPageRel" resultType="com.gxwebsoft.think.entity.ThinkCard">
|
|
<include refid="selectSql"></include>
|
|
</select>
|
|
|
|
<!-- 查询全部 -->
|
|
<select id="selectListRel" resultType="com.gxwebsoft.think.entity.ThinkCard">
|
|
<include refid="selectSql"></include>
|
|
</select>
|
|
|
|
</mapper>
|