|
@@ -161,7 +161,7 @@
|
|
|
<if test="userId > 0">
|
|
|
AND id NOT IN(SELECT couponId FROM cm_coupon_club WHERE userId = #{userId})
|
|
|
AND (couponType IN (0,1,3)
|
|
|
- OR couponType = 2 AND userId = #{userId}
|
|
|
+ OR (couponType = 2 AND userId = #{userId})
|
|
|
OR (#{registerTime} <![CDATA[ >= ]]> startDate AND couponType = 4))
|
|
|
and NOW() <![CDATA[ > ]]> startDate
|
|
|
and NOW() <![CDATA[ < ]]> if(receiveFlag = 1,endDate,
|