Authored by tanling

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

@@ -21,12 +21,12 @@ @@ -21,12 +21,12 @@
21 <result column="pid" jdbcType="INTEGER" property="pid" /> 21 <result column="pid" jdbcType="INTEGER" property="pid" />
22 <result column="remark" jdbcType="VARCHAR" property="remark" /> 22 <result column="remark" jdbcType="VARCHAR" property="remark" />
23 <result column="skup_forbid_type" jdbcType="VARCHAR" property="skupForbidType" /> 23 <result column="skup_forbid_type" jdbcType="VARCHAR" property="skupForbidType" />
24 - <result column="skup_allow_type" jdbcType="VARCHAR" property="skupAllowType" /> 24 + <!--<result column="skup_allow_type" jdbcType="VARCHAR" property="skupAllowType" />-->
25 </resultMap> 25 </resultMap>
26 <sql id="Base_Column_List"> 26 <sql id="Base_Column_List">
27 id, coupon_token, coupon_name, coupon_amount, coupon_type, coupon_num, use_num, send_num, 27 id, coupon_token, coupon_name, coupon_amount, coupon_type, coupon_num, use_num, send_num,
28 use_limit_type, use_limit_value, product_limit_type, product_limit_value, start_time, 28 use_limit_type, use_limit_value, product_limit_type, product_limit_value, start_time,
29 - end_time, status, create_time, pid, remark,skup_forbid_type,skup_allow_type 29 + end_time, status, create_time, pid, remark,skup_forbid_type
30 </sql> 30 </sql>
31 <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> 31 <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
32 select 32 select
@@ -41,8 +41,8 @@ public class CouponRuleMatcher { @@ -41,8 +41,8 @@ public class CouponRuleMatcher {
41 RULE_MATCHERS.add(new UseLimitRuleMatcher()); 41 RULE_MATCHERS.add(new UseLimitRuleMatcher());
42 42
43 // skup类型匹配 43 // skup类型匹配
44 -// RULE_MATCHERS.add(new SkupForbidRuleMatcher());  
45 - 44 + RULE_MATCHERS.add(new SkupForbidRuleMatcher());
  45 +//
46 // 按商品区域匹配 46 // 按商品区域匹配
47 RULE_MATCHERS.add(new SkupRegionRuleMatcher()); 47 RULE_MATCHERS.add(new SkupRegionRuleMatcher());
48 48
@@ -154,27 +154,26 @@ public class CouponRuleMatcher { @@ -154,27 +154,26 @@ public class CouponRuleMatcher {
154 } 154 }
155 } 155 }
156 156
157 - // 6.9.10之后 从[禁用] 改成 [可用]  
158 -// private static class SkupForbidRuleMatcher implements IRuleMatcher {  
159 -// @Override  
160 -// public String ruleName() {  
161 -// return "SkupForbid";  
162 -// }  
163 -//  
164 -// @Override  
165 -// public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) {  
166 -//  
167 -// if (couponsBo.getSkupForbidType() == null){  
168 -// return true;  
169 -// }  
170 -//  
171 -// if (Arrays.asList(couponsBo.getSkupForbidType().split(",")).contains(String.valueOf(chargeGoods.getAttributes()))){  
172 -// return false;  
173 -// }  
174 -//  
175 -// return true;  
176 -// }  
177 -// } 157 + private static class SkupForbidRuleMatcher implements IRuleMatcher {
  158 + @Override
  159 + public String ruleName() {
  160 + return "SkupForbid";
  161 + }
  162 +
  163 + @Override
  164 + public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) {
  165 +
  166 + if (couponsBo.getSkupForbidType() == null){
  167 + return true;
  168 + }
  169 +
  170 + if (Arrays.asList(couponsBo.getSkupForbidType().split(",")).contains(String.valueOf(chargeGoods.getAttributes()))){
  171 + return false;
  172 + }
  173 +
  174 + return true;
  175 + }
  176 + }
178 177
179 178
180 private static class SkupAllowRuleMatcher implements IRuleMatcher{ 179 private static class SkupAllowRuleMatcher implements IRuleMatcher{