Authored by tanling

将[禁用]改[可用]需求暂停

... ... @@ -21,12 +21,12 @@
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="skup_forbid_type" jdbcType="VARCHAR" property="skupForbidType" />
<result column="skup_allow_type" jdbcType="VARCHAR" property="skupAllowType" />
<!--<result column="skup_allow_type" jdbcType="VARCHAR" property="skupAllowType" />-->
</resultMap>
<sql id="Base_Column_List">
id, coupon_token, coupon_name, coupon_amount, coupon_type, coupon_num, use_num, send_num,
use_limit_type, use_limit_value, product_limit_type, product_limit_value, start_time,
end_time, status, create_time, pid, remark,skup_forbid_type,skup_allow_type
end_time, status, create_time, pid, remark,skup_forbid_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
... ...
... ... @@ -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{
... ...