...
|
...
|
@@ -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;
|
|
|
}
|
...
|
...
|
|