diff --git a/mallinkAdmin/src/main/resources/db/migration/V201906251500__CHANGE_CONDITION_COLUMN.sql b/mallinkAdmin/src/main/resources/db/migration/V201906251500__CHANGE_CONDITION_COLUMN.sql new file mode 100644 index 000000000..94ddb4ff1 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201906251500__CHANGE_CONDITION_COLUMN.sql @@ -0,0 +1,2 @@ +ALTER TABLE wx_coupon` +CHANGE COLUMN `condition` `conditions` JSON NULL DEFAULT NULL ; \ No newline at end of file diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java index f0f8d80d3..5e2586286 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java @@ -90,10 +90,10 @@ public class WxOrderController extends BaseController { } private ResultData couponUserCheck(WxCUser user, WxCouponCVo coupon) { - if (coupon.getCondition() == null) return null; + if (coupon.getConditions() == null) return null; JSONObject jo = null; try { - jo = JSONObject.parseObject(coupon.getCondition()); + jo = JSONObject.parseObject(coupon.getConditions()); } catch (Exception e) { logger.error("购买券条件判断错误:ID=" + coupon.getId() + e.getMessage()); } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java index afd404e97..893f73a99 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java @@ -143,7 +143,7 @@ public class WxCoupon extends BaseEntity { private Integer creditRefund; @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") - private String condition; + private String conditions; @Transient diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java index 2268f36cb..825749455 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java @@ -67,7 +67,7 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable { private Integer creditPrice; @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") - private String condition; + private String conditions; @Transient private String salePriceStr; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index 17318af5e..d8e8424d2 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -732,7 +732,7 @@ public class WxOrderServiceImpl implements WxOrderService { // 记录活动 JSONObject jo = null; try { - jo = JSONObject.parseObject(coupon.getCondition()); + jo = JSONObject.parseObject(coupon.getConditions()); } catch (Exception e) { logger.error("购买券条件判断错误:ID=" + coupon.getId() + e.getMessage()); } diff --git a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml index b05d0417b..f90303680 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml @@ -123,7 +123,7 @@ , c.remain_inventory,c.inventory,c.cover_img,c.title,c.sub_title,c.sale_price, - c.use_price,c.price,c.unit,c.use_limit_quantity,c.send_type,c.support_transfer,c.press_limit_num,c.auto_refund,c.condition, + c.use_price,c.price,c.unit,c.use_limit_quantity,c.send_type,c.support_transfer,c.press_limit_num,c.auto_refund,c.conditions, c.valid_type,c.valid_start_date,c.valid_end_date,c.valid_days,c.credit_price @@ -160,7 +160,7 @@ - + @@ -247,7 +247,7 @@ - + - + @@ -92,7 +92,7 @@ `id`,`tenant_id`,`type`,`cover_img`,`cover_picture`,`detail_picture`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`send_type`, `valid_type`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`price`,`unit`,`remain_inventory`,`inventory`, `remark`,`status`,`create_date`,`update_date`,`business`,`sub_business`,`support_transfer`,`subsidy_num`,`subsidy_type`, - `press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund`,`condition` + `press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund`,`conditions` @@ -467,7 +467,7 @@ - +