zhijiezhao 3 年之前
父節點
當前提交
f5a2046c7a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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,