Commit bbea40c8 by 吕明尚

修改查询

parent 7e2528c5
...@@ -67,7 +67,10 @@ ...@@ -67,7 +67,10 @@
where c.is_delete = 0 where c.is_delete = 0
<if test="monthlyCardConfId != null ">and c.monthly_card_conf_id = #{monthlyCardConfId}</if> <if test="monthlyCardConfId != null ">and c.monthly_card_conf_id = #{monthlyCardConfId}</if>
<if test="consumerId != null ">and c.consumer_id = #{consumerId}</if> <if test="consumerId != null ">and c.consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and c.phone = #{phone}</if> <if test="phone != null and phone != ''">and c.phone like concat('%', #{phone},'%')
</if>
<if test="nickName != null and nickName != ''">and c2.nick_name like concat('%', #{nickName},'%')
</if>
<if test="freeDuration != null ">and c.free_duration = #{freeDuration}</if> <if test="freeDuration != null ">and c.free_duration = #{freeDuration}</if>
<if test="monthlyCardDays != null ">and c.monthly_card_days = #{monthlyCardDays}</if> <if test="monthlyCardDays != null ">and c.monthly_card_days = #{monthlyCardDays}</if>
<if test="expirationDate != null ">and c.expiration_date = #{expirationDate}</if> <if test="expirationDate != null ">and c.expiration_date = #{expirationDate}</if>
......
...@@ -70,7 +70,10 @@ ...@@ -70,7 +70,10 @@
c.is_delete = 0 c.is_delete = 0
<if test="secondaryCardConfId != null ">and c.secondary_card_conf_id = #{secondaryCardConfId}</if> <if test="secondaryCardConfId != null ">and c.secondary_card_conf_id = #{secondaryCardConfId}</if>
<if test="consumerId != null ">and c.consumer_id = #{consumerId}</if> <if test="consumerId != null ">and c.consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and c.phone = #{phone}</if> <if test="phone != null and phone != ''">and c.phone like concat('%', #{phone},'%')
</if>
<if test="nickName != null and nickName != ''">and m.nick_name like concat('%', #{nickName},'%')
</if>
<if test="singleDuration != null ">and c.single_duration = #{singleDuration}</if> <if test="singleDuration != null ">and c.single_duration = #{singleDuration}</if>
<if test="singleAmount != null ">and c.single_amount = #{singleAmount}</if> <if test="singleAmount != null ">and c.single_amount = #{singleAmount}</if>
<if test="expirationDate != null ">and c.expiration_date = #{expirationDate}</if> <if test="expirationDate != null ">and c.expiration_date = #{expirationDate}</if>
......
...@@ -68,7 +68,10 @@ ...@@ -68,7 +68,10 @@
where l.is_delete = 0 where l.is_delete = 0
<if test="consumerMonthlyCardId != null ">and l.consumer_monthly_card_id = #{consumerMonthlyCardId}</if> <if test="consumerMonthlyCardId != null ">and l.consumer_monthly_card_id = #{consumerMonthlyCardId}</if>
<if test="consumerId != null ">and l.consumer_id = #{consumerId}</if> <if test="consumerId != null ">and l.consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and l.phone = #{phone}</if> <if test="phone != null and phone != ''">and l.phone like concat('%', #{phone},'%')
</if>
<if test="nickName != null and nickName != ''">and c.nick_name like concat('%', #{nickName},'%')
</if>
<if test="useDuration != null ">and l.use_duration = #{useDuration}</if> <if test="useDuration != null ">and l.use_duration = #{useDuration}</if>
<if test="residueDuration != null ">and l.residue_duration = #{residueDuration}</if> <if test="residueDuration != null ">and l.residue_duration = #{residueDuration}</if>
order by l.create_time desc order by l.create_time desc
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
where o.is_delete = 0 where o.is_delete = 0
<if test="nickName != null and nickName != ''">and c.nick_name like concat('%', #{nickName},'%') <if test="nickName != null and nickName != ''">and c.nick_name like concat('%', #{nickName},'%')
</if> </if>
<if test="phone != null and phone != ''">and o.phone like concat('%', #{phone},'%')
</if>
<if test="monthlyCardNo != null and monthlyCardNo != ''">and o.monthly_card_no = #{monthlyCardNo}</if> <if test="monthlyCardNo != null and monthlyCardNo != ''">and o.monthly_card_no = #{monthlyCardNo}</if>
<if test="outTradeNo != null and outTradeNo != ''">and o.out_trade_no = #{outTradeNo}</if> <if test="outTradeNo != null and outTradeNo != ''">and o.out_trade_no = #{outTradeNo}</if>
<if test="terminalTrace != null and terminalTrace != ''">and o.terminal_trace = #{terminalTrace}</if> <if test="terminalTrace != null and terminalTrace != ''">and o.terminal_trace = #{terminalTrace}</if>
......
...@@ -69,8 +69,10 @@ ...@@ -69,8 +69,10 @@
<if test="consumerSecondaryCardId != null ">and l.consumer_secondary_card_id = #{consumerSecondaryCardId} <if test="consumerSecondaryCardId != null ">and l.consumer_secondary_card_id = #{consumerSecondaryCardId}
</if> </if>
<if test="consumerId != null ">and l.consumer_id = #{consumerId}</if> <if test="consumerId != null ">and l.consumer_id = #{consumerId}</if>
<if test="phone != null and phone != ''">and l.phone = #{phone}</if> <if test="phone != null and phone != ''">and l.phone like concat('%', #{phone},'%')
</if>
<if test="nickName != null and nickName != ''">and c.nick_name like concat('%', #{nickName},'%')
</if>
<if test="usageCount != null ">and l.usage_count = #{usageCount}</if> <if test="usageCount != null ">and l.usage_count = #{usageCount}</if>
<if test="residueCount != null ">and l.residue_count = #{residueCount}</if> <if test="residueCount != null ">and l.residue_count = #{residueCount}</if>
order by l.create_time desc order by l.create_time desc
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
</if> </if>
<if test="nickName != null and nickName != ''">and c1.nick_name like concat('%', #{nickName},'%') <if test="nickName != null and nickName != ''">and c1.nick_name like concat('%', #{nickName},'%')
</if> </if>
<if test="phone != null and phone != ''">and o.phone like concat('%', #{phone},'%')
</if>
<if test="outTradeNo != null and outTradeNo != ''">and o.out_trade_no = #{outTradeNo}</if> <if test="outTradeNo != null and outTradeNo != ''">and o.out_trade_no = #{outTradeNo}</if>
<if test="terminalTrace != null and terminalTrace != ''">and o.terminal_trace = #{terminalTrace}</if> <if test="terminalTrace != null and terminalTrace != ''">and o.terminal_trace = #{terminalTrace}</if>
<if test="secondaryCardAmount != null ">and o.secondary_card_amount = #{secondaryCardAmount}</if> <if test="secondaryCardAmount != null ">and o.secondary_card_amount = #{secondaryCardAmount}</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment