瀏覽代碼

bugfix-呵呵优惠券-用户领取列表

Aslee 3 年之前
父節點
當前提交
052291e07b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/resources/mappings/modules/hehe/CmHeheCouponMapper.xml

+ 2 - 2
src/main/resources/mappings/modules/hehe/CmHeheCouponMapper.xml

@@ -138,9 +138,9 @@
 	<select id="allUserList" resultType="com.caimei.modules.hehe.entity.CmHeheReceiveUser">
 		select u.userId as userId,u.nickName,u.mobile,u.userIdentity,count(rc.id) as receiveNum, count(chc.id) as ableNum
 		from cm_hehe_user u
-		    left join cm_hehe_receive_coupon rc on u.userId = rc.userId and rc.delFlag = 0
+		    left join cm_hehe_receive_coupon rc on u.userId = rc.userId and rc.delFlag = 0 and rc.couponId in (select id from cm_hehe_coupon where delFlag = 0)
 			left join cm_hehe_coupon chc on rc.couponId = chc.id
-			and NOW() <![CDATA[ < ]]> DATE_ADD(rc.receiveTime ,interval chc.usePeriod DAY)
+			and NOW() <![CDATA[ < ]]> DATE_ADD(rc.receiveTime ,interval chc.usePeriod DAY) and rc.status = 1
 			and chc.delFlag = 0
 		<where>
 			<if test="nickName != null and nickName != ''">