zhijiezhao 3 years ago
parent
commit
f5a2046c7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/resources/mapper/CouponMapper.xml

+ 1 - 1
src/main/resources/mapper/CouponMapper.xml

@@ -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,