Преглед изворни кода

[疲劳度][修复]:疲劳度可以设置为不检查日期内同一张券

release_toaliyun_real
hupeng пре 7 година
родитељ
комит
5bd7a3cc42
1 измењених фајлова са 9 додато и 7 уклоњено
  1. +9
    -7
      mallinkService/src/main/java/com/iformall/service/impl/PushLimitServiceImpl.java

+ 9
- 7
mallinkService/src/main/java/com/iformall/service/impl/PushLimitServiceImpl.java Прегледај датотеку

@@ -137,13 +137,15 @@ public class PushLimitServiceImpl implements PushLimitService {
throw new MallinkException(ErrorCode.PUSH_LIMIT_UP_TO_1DAYLIMIT.getCode(), errMsg);
}
// 4. check 每人多少天内不会重复收到一张券
params.put("couponId", couponId);
params.put("dayNum", pushLimit.getCouponDay()-1);
int countForUserCoupon = wxCouponActionLogMapper.getCountByUserAndCoupon(params);
if (countForUserCoupon >= 1) {
String errMsg = "每人" + pushLimit.getCouponDay() + "天领一张券已到疲劳度上限";
logger.error(errMsg);
throw new MallinkException(ErrorCode.PUSH_LIMIT_UP_TO_COUPONLIMIT.getCode(), errMsg);
if (pushLimit.getCouponDay() > 0) {
params.put("couponId", couponId);
params.put("dayNum", pushLimit.getCouponDay()-1);
int countForUserCoupon = wxCouponActionLogMapper.getCountByUserAndCoupon(params);
if (countForUserCoupon >= 1) {
String errMsg = "每人" + pushLimit.getCouponDay() + "天领一张券已到疲劳度上限";
logger.error(errMsg);
throw new MallinkException(ErrorCode.PUSH_LIMIT_UP_TO_COUPONLIMIT.getCode(), errMsg);
}
}

return true;


Loading…
Откажи
Сачувај