...
|
...
|
@@ -41,8 +41,8 @@ public class CouponRuleMatcher { |
|
|
RULE_MATCHERS.add(new UseLimitRuleMatcher());
|
|
|
|
|
|
// skup类型匹配
|
|
|
// RULE_MATCHERS.add(new SkupForbidRuleMatcher());
|
|
|
|
|
|
RULE_MATCHERS.add(new SkupForbidRuleMatcher());
|
|
|
//
|
|
|
// 按商品区域匹配
|
|
|
RULE_MATCHERS.add(new SkupRegionRuleMatcher());
|
|
|
|
...
|
...
|
@@ -154,27 +154,26 @@ public class CouponRuleMatcher { |
|
|
}
|
|
|
}
|
|
|
|
|
|
// 6.9.10之后 从[禁用] 改成 [可用]
|
|
|
// private static class SkupForbidRuleMatcher implements IRuleMatcher {
|
|
|
// @Override
|
|
|
// public String ruleName() {
|
|
|
// return "SkupForbid";
|
|
|
// }
|
|
|
//
|
|
|
// @Override
|
|
|
// public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) {
|
|
|
//
|
|
|
// if (couponsBo.getSkupForbidType() == null){
|
|
|
// return true;
|
|
|
// }
|
|
|
//
|
|
|
// if (Arrays.asList(couponsBo.getSkupForbidType().split(",")).contains(String.valueOf(chargeGoods.getAttributes()))){
|
|
|
// return false;
|
|
|
// }
|
|
|
//
|
|
|
// return true;
|
|
|
// }
|
|
|
// }
|
|
|
private static class SkupForbidRuleMatcher implements IRuleMatcher {
|
|
|
@Override
|
|
|
public String ruleName() {
|
|
|
return "SkupForbid";
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) {
|
|
|
|
|
|
if (couponsBo.getSkupForbidType() == null){
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
if (Arrays.asList(couponsBo.getSkupForbidType().split(",")).contains(String.valueOf(chargeGoods.getAttributes()))){
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
private static class SkupAllowRuleMatcher implements IRuleMatcher{
|
...
|
...
|
|