Procházet zdrojové kódy

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

release_toaliyun_real
hupeng před 7 roky
rodič
revize
5bd7a3cc42
1 změnil soubory, kde provedl 9 přidání a 7 odebrání
  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 Zobrazit soubor

@@ -137,13 +137,15 @@ public class PushLimitServiceImpl implements PushLimitService {
throw new MallinkException(ErrorCode.PUSH_LIMIT_UP_TO_1DAYLIMIT.getCode(), errMsg); throw new MallinkException(ErrorCode.PUSH_LIMIT_UP_TO_1DAYLIMIT.getCode(), errMsg);
} }
// 4. check 每人多少天内不会重复收到一张券 // 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; return true;


Načítá se…
Zrušit
Uložit