Переглянути джерело

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

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;


Завантаження…
Відмінити
Зберегти