Browse Source

优惠券bug修复

master
wengding 17 hours ago
parent
commit
ba67018c68
  1. 4
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/PromotionCouponTemplateServiceImpl.java

4
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/PromotionCouponTemplateServiceImpl.java

@ -156,11 +156,11 @@ public class PromotionCouponTemplateServiceImpl implements IPromotionCouponTempl
SysUser sysUser = sysUserMapper.selectById(bo.getUserId());
lqw.apply(
" (take_limit_count = -1 or take_limit_count >= (select count(bc.id) from promotion_coupon bc where bc.template_id = id and bc.user_id = {0} )) " +
"and ( product_scope_type in (1, 2, 3) or (product_scope_type = 4 and date_format(register_date, '%y-%m-%d') <= date_format({1}, '%y-%m-%d'))",
"and ( product_scope_type in (1, 2, 3) or (product_scope_type = 4 and date_format(register_date, '%y-%m-%d') <= date_format({1}, '%y-%m-%d')))",
bo.getUserId(), sysUser.getCreateTime());
}else if (bo.getUserId() != null){
lqw.apply(
" (take_limit_count = -1 ");
" (take_limit_count = -1 )");
}
return lqw;
}

Loading…
Cancel
Save