优惠券 记录
This commit is contained in:
@@ -4,4 +4,34 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.account.mapper.ShopActivateCouponRecordMapper">
|
||||
|
||||
<select id="queryReceive" resultType="com.czg.account.vo.CouponReceiveVo">
|
||||
SELECT
|
||||
record.id,
|
||||
vip.id as userId ,
|
||||
vip.`name`,
|
||||
vip.telephone as phone,
|
||||
record.create_time as receiveTime,
|
||||
record.update_time as useTime,
|
||||
record.source as source
|
||||
FROM
|
||||
tb_shop_activate_coupon_record record
|
||||
LEFT JOIN tb_shop_user vip
|
||||
ON record.shop_user_id = vip.id AND vip.shop_id = #{param.shopId}
|
||||
WHERE
|
||||
record.coupon_id = #{param.couponId}
|
||||
and record.shop_id = #{param.shopId}
|
||||
<if test="param.value != null and param.value != '' ">
|
||||
and (vip.name like concat('%', #{param.value}, '%') or vip.telephone like concat('%', #{param.value}, '%'))
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
and record.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.startTime != null ">
|
||||
and record.create_time > #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null ">
|
||||
and record.create_time < #{param.endTime}
|
||||
</if>
|
||||
order by record.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user