Authored by TANLING

fix log

... ... @@ -58,16 +58,18 @@ public class ProductLimitCollector {
* @param productLimitInfo
* @return
*/
public static boolean match(ShoppingProductInfo shoppingProductInfo, ProductLimitInfo productLimitInfo){
public static boolean match(String couponCode,
ShoppingProductInfo shoppingProductInfo, ProductLimitInfo productLimitInfo){
for (LimitValueHandler limitValueHandler : LIMIT_VALUES_LIST){
if (!limitValueHandler.isMatch(shoppingProductInfo, productLimitInfo)){
logger.info("{} product limit not match, goods info {}, coupon info {}", limitValueHandler.getLimitValue(), shoppingProductInfo, productLimitInfo);
logger.info("[{}] ProductLimitRuleMatcher Condition <<< {},{}; Result <<< [{}] not matched",
couponCode, shoppingProductInfo, productLimitInfo, limitValueHandler.getLimitValue());
return false;
}
}
logger.info("product limit matched, goods info {}, coupon info {}", shoppingProductInfo, productLimitInfo);
logger.info("[{}] ProductLimitRuleMatcher Condition <<< {},{}; Result <<< matched", couponCode, shoppingProductInfo, productLimitInfo);
return true;
}
... ...
... ... @@ -110,7 +110,7 @@ public class CouponRuleMatcher {
@Override
public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) {
return ProductLimitCollector.match(chargeGoods.getShoppingProductInfo(), couponsBo.getProductLimitInfo());
return ProductLimitCollector.match(couponsBo.getCouponCode() ,chargeGoods.getShoppingProductInfo(), couponsBo.getProductLimitInfo());
}
}
... ...