Forráskód Böngészése

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

Aslee 3 éve
szülő
commit
052291e07b

+ 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 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
 		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
 		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
 			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
 			and chc.delFlag = 0
 		<where>
 		<where>
 			<if test="nickName != null and nickName != ''">
 			<if test="nickName != null and nickName != ''">