| @@ -0,0 +1,2 @@ | |||||
| ALTER TABLE wx_coupon` | |||||
| CHANGE COLUMN `condition` `conditions` JSON NULL DEFAULT NULL ; | |||||
| @@ -90,10 +90,10 @@ public class WxOrderController extends BaseController { | |||||
| } | } | ||||
| private ResultData couponUserCheck(WxCUser user, WxCouponCVo coupon) { | private ResultData couponUserCheck(WxCUser user, WxCouponCVo coupon) { | ||||
| if (coupon.getCondition() == null) return null; | |||||
| if (coupon.getConditions() == null) return null; | |||||
| JSONObject jo = null; | JSONObject jo = null; | ||||
| try { | try { | ||||
| jo = JSONObject.parseObject(coupon.getCondition()); | |||||
| jo = JSONObject.parseObject(coupon.getConditions()); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("购买券条件判断错误:ID=" + coupon.getId() + e.getMessage()); | logger.error("购买券条件判断错误:ID=" + coupon.getId() + e.getMessage()); | ||||
| } | } | ||||
| @@ -143,7 +143,7 @@ public class WxCoupon extends BaseEntity { | |||||
| private Integer creditRefund; | private Integer creditRefund; | ||||
| @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") | @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") | ||||
| private String condition; | |||||
| private String conditions; | |||||
| @Transient | @Transient | ||||
| @@ -67,7 +67,7 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable { | |||||
| private Integer creditPrice; | private Integer creditPrice; | ||||
| @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") | @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") | ||||
| private String condition; | |||||
| private String conditions; | |||||
| @Transient | @Transient | ||||
| private String salePriceStr; | private String salePriceStr; | ||||
| @@ -732,7 +732,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| // 记录活动 | // 记录活动 | ||||
| JSONObject jo = null; | JSONObject jo = null; | ||||
| try { | try { | ||||
| jo = JSONObject.parseObject(coupon.getCondition()); | |||||
| jo = JSONObject.parseObject(coupon.getConditions()); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("购买券条件判断错误:ID=" + coupon.getId() + e.getMessage()); | logger.error("购买券条件判断错误:ID=" + coupon.getId() + e.getMessage()); | ||||
| } | } | ||||
| @@ -123,7 +123,7 @@ | |||||
| <sql id="CouponChannelVoColumns"> | <sql id="CouponChannelVoColumns"> | ||||
| <include refid="allColumns" />, | <include refid="allColumns" />, | ||||
| c.remain_inventory,c.inventory,c.cover_img,c.title,c.sub_title,c.sale_price, | 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 | c.valid_type,c.valid_start_date,c.valid_end_date,c.valid_days,c.credit_price | ||||
| </sql> | </sql> | ||||
| @@ -160,7 +160,7 @@ | |||||
| <result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/> | <result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/> | ||||
| <result column="valid_days" jdbcType="INTEGER" property="validDays"/> | <result column="valid_days" jdbcType="INTEGER" property="validDays"/> | ||||
| <result column="qr_code" property="qrCode"/> | <result column="qr_code" property="qrCode"/> | ||||
| <result column="condition" jdbcType="VARCHAR" property="condition" /> | |||||
| <result column="conditions" jdbcType="VARCHAR" property="conditions" /> | |||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | <collection column="{productId=coupon_id}" property="merchantVoList" | ||||
| @@ -205,7 +205,7 @@ | |||||
| c.tenant_id,c.type,c.cover_img,c.cover_picture,c.detail_picture,c.title,c.sub_title,c.sale_price,c.use_price, | c.tenant_id,c.type,c.cover_img,c.cover_picture,c.detail_picture,c.title,c.sub_title,c.sale_price,c.use_price, | ||||
| c.use_limit_quantity,c.send_type,c.valid_type,c.valid_start_date,c.valid_end_date, | c.use_limit_quantity,c.send_type,c.valid_type,c.valid_start_date,c.valid_end_date, | ||||
| c.valid_days,c.detail,c.price,c.unit,c.remain_inventory,c.inventory,c.remark,c.status, | c.valid_days,c.detail,c.price,c.unit,c.remain_inventory,c.inventory,c.remark,c.status, | ||||
| c.create_date,c.update_date,c.business,c.sub_business,c.support_transfer,c.press_limit_num, c.auto_refund,c.credit_price,c.condition, | |||||
| c.create_date,c.update_date,c.business,c.sub_business,c.support_transfer,c.press_limit_num, c.auto_refund,c.credit_price,c.conditions, | |||||
| cc.qr_code | cc.qr_code | ||||
| </sql> | </sql> | ||||
| @@ -247,7 +247,7 @@ | |||||
| <result column="press_limit_num" jdbcType="INTEGER" property="pressLimitNum"/> | <result column="press_limit_num" jdbcType="INTEGER" property="pressLimitNum"/> | ||||
| <result column="auto_refund" jdbcType="INTEGER" property="autoRefund"/> | <result column="auto_refund" jdbcType="INTEGER" property="autoRefund"/> | ||||
| <result column="qr_code" property="qrCode"/> | <result column="qr_code" property="qrCode"/> | ||||
| <result column="condition" jdbcType="VARCHAR" property="condition" /> | |||||
| <result column="conditions" jdbcType="VARCHAR" property="conditions" /> | |||||
| <collection column="{productId=coupon_id}" property="merchantVoList" | <collection column="{productId=coupon_id}" property="merchantVoList" | ||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| @@ -38,7 +38,7 @@ | |||||
| <result column="credit_price" jdbcType="INTEGER" property="creditPrice"/> | <result column="credit_price" jdbcType="INTEGER" property="creditPrice"/> | ||||
| <result column="credit_refund" jdbcType="INTEGER" property="creditRefund"/> | <result column="credit_refund" jdbcType="INTEGER" property="creditRefund"/> | ||||
| <result column="is_del" property="isDel"/> | <result column="is_del" property="isDel"/> | ||||
| <result column="condition" jdbcType="VARCHAR" property="condition"/> | |||||
| <result column="conditions" jdbcType="VARCHAR" property="conditions"/> | |||||
| </resultMap> | </resultMap> | ||||
| <resultMap id="statisMap" type="com.iformall.domain.vo.WxCouponStatisVo"> | <resultMap id="statisMap" type="com.iformall.domain.vo.WxCouponStatisVo"> | ||||
| @@ -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`, | `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`, | `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`, | `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` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -467,7 +467,7 @@ | |||||
| <result column="subsidy_num" jdbcType="INTEGER" property="subsidyNum"/> | <result column="subsidy_num" jdbcType="INTEGER" property="subsidyNum"/> | ||||
| <result column="press_limit_num" jdbcType="INTEGER" property="pressLimitNum"/> | <result column="press_limit_num" jdbcType="INTEGER" property="pressLimitNum"/> | ||||
| <result column="press_limit_hours" jdbcType="INTEGER" property="pressLimitHours"/> | <result column="press_limit_hours" jdbcType="INTEGER" property="pressLimitHours"/> | ||||
| <result column="condition" jdbcType="VARCHAR" property="condition"/> | |||||
| <result column="conditions" jdbcType="VARCHAR" property="conditions"/> | |||||
| <collection column="{productId=id}" property="merchantVoList" | <collection column="{productId=id}" property="merchantVoList" | ||||
| ofType="com.iformall.domain.vo.WxMerchantVo" | ofType="com.iformall.domain.vo.WxMerchantVo" | ||||
| @@ -793,7 +793,7 @@ | |||||
| wc.tenant_id,wc.`type`,wc.`cover_img`,wc.`cover_picture`,wc.`detail_picture`,wc.`title`,wc.`sub_title`,wc.`sale_price`,wc.`use_price`,wc.`use_limit_quantity`,wc.`send_type`, | wc.tenant_id,wc.`type`,wc.`cover_img`,wc.`cover_picture`,wc.`detail_picture`,wc.`title`,wc.`sub_title`,wc.`sale_price`,wc.`use_price`,wc.`use_limit_quantity`,wc.`send_type`, | ||||
| wc.`valid_type`,wc.`valid_start_date`,wc.`valid_end_date`,wc.`valid_days`,wc.`detail`,wc.`price`,wc.`unit`,wc.`remain_inventory`,wc.`inventory`, | wc.`valid_type`,wc.`valid_start_date`,wc.`valid_end_date`,wc.`valid_days`,wc.`detail`,wc.`price`,wc.`unit`,wc.`remain_inventory`,wc.`inventory`, | ||||
| wc.`remark`,wc.`status`,wc.`create_date`,wc.`update_date`,wc.`business`,wc.`sub_business`,wc.`support_transfer`,wc.`subsidy_num`,wc.`subsidy_type`, | wc.`remark`,wc.`status`,wc.`create_date`,wc.`update_date`,wc.`business`,wc.`sub_business`,wc.`support_transfer`,wc.`subsidy_num`,wc.`subsidy_type`, | ||||
| wc.`press_limit_num`, wc.`press_limit_hours`, wc.`auto_refund`,wc.`credit_price`,wc.`credit_refund`,wx.`condition` | |||||
| wc.`press_limit_num`, wc.`press_limit_hours`, wc.`auto_refund`,wc.`credit_price`,wc.`credit_refund`,wx.`conditions` | |||||
| ,wc.title as couponName,wc.`cover_img` as couponPic,wc.`cover_picture` as couponPicture,wc.`detail_picture` as detailPicture,wc.id as couponId from wx_coupon_channel ct left join | ,wc.title as couponName,wc.`cover_img` as couponPic,wc.`cover_picture` as couponPicture,wc.`detail_picture` as detailPicture,wc.id as couponId from wx_coupon_channel ct left join | ||||
| wx_coupon wc on wc.id = ct.coupon_id | wx_coupon wc on wc.id = ct.coupon_id | ||||
| where ct.`sub_target_id` = #{id} | where ct.`sub_target_id` = #{id} | ||||