| @@ -0,0 +1,200 @@ | |||||
| ALTER TABLE `mallink`.`wx_coupon_0` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_1` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_2` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_3` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_4` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_5` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_6` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_7` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_8` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_9` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_10` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_11` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_12` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_13` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_14` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_15` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_16` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_17` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_18` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_19` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_20` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_21` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_22` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_23` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_24` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_25` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_26` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_27` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_28` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_29` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_30` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_31` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_32` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_33` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_34` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_35` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_36` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_37` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_38` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_39` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_40` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_41` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_42` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_43` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_44` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_45` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_46` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_47` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_48` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_49` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_50` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_51` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_52` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_53` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_54` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_55` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_56` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_57` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_58` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_59` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_60` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_61` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_62` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_63` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_64` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_65` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_66` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_67` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_68` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_69` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_70` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_71` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_72` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_73` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_74` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_75` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_76` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_77` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_78` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_79` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_80` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_81` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_82` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_83` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_84` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_85` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_86` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_87` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_88` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_89` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_90` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_91` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_92` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_93` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_94` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_95` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_96` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_97` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_98` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| ALTER TABLE `mallink`.`wx_coupon_99` | |||||
| ADD COLUMN `merchant_type` tinyint(1) AFTER `source_type`; | |||||
| @@ -194,6 +194,9 @@ public class WxCoupon extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="1:A端发卷,2:B端发卷",name="sourceType") | @io.swagger.annotations.ApiModelProperty(value="1:A端发卷,2:B端发卷",name="sourceType") | ||||
| private Integer sourceType; | private Integer sourceType; | ||||
| @io.swagger.annotations.ApiModelProperty(value="EnumCouponMerchantType",name="merchantType") | |||||
| private Integer merchantType; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String merchantParams; | private String merchantParams; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -0,0 +1,37 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumCouponMerchantType { | |||||
| // | |||||
| ONE_MERCHANT(1, "单商户"), | |||||
| MULTIPLE_MERCHANT(2, "多商户") | |||||
| ; | |||||
| public static EnumCouponMerchantType getEnum(Integer code) { | |||||
| for (EnumCouponMerchantType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumCouponMerchantType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -436,6 +436,11 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| return resultData; | return resultData; | ||||
| } | } | ||||
| List<JSONObject> merchantParamList = JSONObject.parseArray(record.getMerchantParams(), JSONObject.class); | List<JSONObject> merchantParamList = JSONObject.parseArray(record.getMerchantParams(), JSONObject.class); | ||||
| if(merchantParamList != null && merchantParamList.size() == 1){ | |||||
| record.setMerchantType(EnumCouponMerchantType.ONE_MERCHANT.getCode()); | |||||
| }else if(merchantParamList != null && merchantParamList.size() > 1){ | |||||
| record.setMerchantType(EnumCouponMerchantType.MULTIPLE_MERCHANT.getCode()); | |||||
| } | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| if (record.getId() == null) { | if (record.getId() == null) { | ||||
| @@ -55,6 +55,7 @@ | |||||
| <result column="content_type" property="contentType"/> | <result column="content_type" property="contentType"/> | ||||
| <result column="html" property="html"/> | <result column="html" property="html"/> | ||||
| <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | ||||
| <result column="merchant_type" jdbcType="INTEGER" property="merchantType"/> | |||||
| <result column="product_type" jdbcType="INTEGER" property="productType"/> | <result column="product_type" jdbcType="INTEGER" property="productType"/> | ||||
| <result column="category_id" jdbcType="INTEGER" property="categoryId"/> | <result column="category_id" jdbcType="INTEGER" property="categoryId"/> | ||||
| </resultMap> | </resultMap> | ||||
| @@ -107,6 +108,7 @@ | |||||
| <result column="payment_rate" property="paymentRate"/> | <result column="payment_rate" property="paymentRate"/> | ||||
| <result column="change_rate" property="changeRate"/> | <result column="change_rate" property="changeRate"/> | ||||
| <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | ||||
| <result column="merchant_type" jdbcType="INTEGER" property="merchantType"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -115,7 +117,7 @@ | |||||
| c.`valid_type`,c.`valid_start_date`,c.`valid_end_date`,c.pick_start_date,c.pick_end_date,c.`valid_days`,c.`detail`,c.`price`,c.tail_price,c.orig_price,c.`unit`,c.`remain_inventory`,c.`inventory`, | c.`valid_type`,c.`valid_start_date`,c.`valid_end_date`,c.pick_start_date,c.pick_end_date,c.`valid_days`,c.`detail`,c.`price`,c.tail_price,c.orig_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.`subsidy_num`,c.`subsidy_type`, | c.`remark`,c.`status`,c.`create_date`,c.`update_date`,c.`business`,c.`sub_business`,c.`support_transfer`,c.`subsidy_num`,c.`subsidy_type`, | ||||
| c.`press_limit_num`, c.`press_limit_hours`, c.`auto_refund`,c.`credit_price`,c.`credit_refund`,c.`put_apply_status`,c.`stock_apply_status`,c.`cancle_apply_status`, | c.`press_limit_num`, c.`press_limit_hours`, c.`auto_refund`,c.`credit_price`,c.`credit_refund`,c.`put_apply_status`,c.`stock_apply_status`,c.`cancle_apply_status`, | ||||
| c.`conditions`,c.approval_type,c.content_type,c.source_type,c.password_support,c.gift_list,c.product_type,c.category_id | |||||
| c.`conditions`,c.approval_type,c.content_type,c.source_type,c.merchant_type,c.password_support,c.gift_list,c.product_type,c.category_id | |||||
| </sql> | </sql> | ||||
| <sql id="statusColumns"> | <sql id="statusColumns"> | ||||
| @@ -294,6 +296,10 @@ | |||||
| and `source_type` = #{sourceType} | and `source_type` = #{sourceType} | ||||
| </if> | </if> | ||||
| <if test=" null != merchantType "> | |||||
| and `merchant_type` = #{merchantType} | |||||
| </if> | |||||
| <if test=" null != giftList"> | <if test=" null != giftList"> | ||||
| and JSON_CONTAINS(gift_list,json_array(#{giftList})) | and JSON_CONTAINS(gift_list,json_array(#{giftList})) | ||||
| </if> | </if> | ||||
| @@ -353,7 +359,7 @@ | |||||
| </select> | </select> | ||||
| <select id="findTenantSimpleList" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | <select id="findTenantSimpleList" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | ||||
| select id,title,sale_price,use_price,price,tail_price,orig_price,auto_refund,business,subsidy_type,source_type,type,unit,cover_img, | |||||
| select id,title,sale_price,use_price,price,tail_price,orig_price,auto_refund,business,subsidy_type,source_type,merchant_type,type,unit,cover_img, | |||||
| sub_title,item_group,valid_type,valid_start_date,valid_end_date,pick_start_date,pick_end_date | sub_title,item_group,valid_type,valid_start_date,valid_end_date,pick_start_date,pick_end_date | ||||
| from wx_coupon c where c.`tenant_id` = #{tenantId} | from wx_coupon c where c.`tenant_id` = #{tenantId} | ||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| @@ -372,7 +378,7 @@ | |||||
| <select id="findSimpleDetail" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | <select id="findSimpleDetail" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | ||||
| select c.id,c.type,c.cover_img,c.title,c.sub_title,c.item_group,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.detail,c.remark,c.valid_type,c.valid_start_date, | select c.id,c.type,c.cover_img,c.title,c.sub_title,c.item_group,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.detail,c.remark,c.valid_type,c.valid_start_date, | ||||
| c.valid_end_date,c.pick_start_date,c.pick_end_date,c.auto_refund,c.business,c.subsidy_type,c.source_type,c.content_type,c.gift_list,c.support_transfer,c.subsidy_num | |||||
| c.valid_end_date,c.pick_start_date,c.pick_end_date,c.auto_refund,c.business,c.subsidy_type,c.source_type,c.merchant_type,c.content_type,c.gift_list,c.support_transfer,c.subsidy_num | |||||
| from wx_coupon c where c.id = #{id} and c.`tenant_id` = #{tenantId} | from wx_coupon c where c.id = #{id} and c.`tenant_id` = #{tenantId} | ||||
| </select> | </select> | ||||
| @@ -388,7 +394,7 @@ | |||||
| <select id="findSimpleDetailList" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | <select id="findSimpleDetailList" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | ||||
| select c.id,c.type,c.cover_img,c.title,c.sub_title,c.item_group,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.detail,c.remark,c.valid_type,c.valid_start_date, | select c.id,c.type,c.cover_img,c.title,c.sub_title,c.item_group,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.detail,c.remark,c.valid_type,c.valid_start_date, | ||||
| c.valid_end_date,c.pick_start_date,c.pick_end_date,c.auto_refund,c.business,c.subsidy_type,c.source_type,c.content_type | |||||
| c.valid_end_date,c.pick_start_date,c.pick_end_date,c.auto_refund,c.business,c.subsidy_type,c.source_type,c.merchant_type,c.content_type | |||||
| from wx_coupon c | from wx_coupon c | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| @@ -634,6 +640,10 @@ | |||||
| and c.`source_type` = #{sourceType} | and c.`source_type` = #{sourceType} | ||||
| </if> | </if> | ||||
| <if test=" null != merchantType "> | |||||
| and c.`merchant_type` = #{merchantType} | |||||
| </if> | |||||
| <if test=" null != merchantId "> | <if test=" null != merchantId "> | ||||
| and cm.`merchant_id` = #{merchantId} | and cm.`merchant_id` = #{merchantId} | ||||
| </if> | </if> | ||||
| @@ -730,6 +740,7 @@ | |||||
| <result column="conditions" jdbcType="VARCHAR" property="conditions"/> | <result column="conditions" jdbcType="VARCHAR" property="conditions"/> | ||||
| <result column="content_type" jdbcType="INTEGER" property="contentType"/> | <result column="content_type" jdbcType="INTEGER" property="contentType"/> | ||||
| <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | ||||
| <result column="merchant_type" jdbcType="INTEGER" property="merchantType"/> | |||||
| <result column="gift_list" jdbcType="VARCHAR" property="giftList"></result> | <result column="gift_list" jdbcType="VARCHAR" property="giftList"></result> | ||||
| @@ -781,6 +792,7 @@ | |||||
| <result column="conditions" jdbcType="VARCHAR" property="conditions"/> | <result column="conditions" jdbcType="VARCHAR" property="conditions"/> | ||||
| <result column="content_type" jdbcType="INTEGER" property="contentType"/> | <result column="content_type" jdbcType="INTEGER" property="contentType"/> | ||||
| <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | ||||
| <result column="merchant_type" jdbcType="INTEGER" property="merchantType"/> | |||||
| </resultMap> | </resultMap> | ||||
| <select id="findVoDetail" parameterType="java.util.HashMap" resultMap="WxCouponCVoMap"> | <select id="findVoDetail" parameterType="java.util.HashMap" resultMap="WxCouponCVoMap"> | ||||
| @@ -1289,7 +1301,7 @@ | |||||
| select id,remain_inventory,inventory,cover_img,title,sub_title,item_group,sale_price,use_price,price,tail_price, | select id,remain_inventory,inventory,cover_img,title,sub_title,item_group,sale_price,use_price,price,tail_price, | ||||
| orig_price,unit,use_limit_rule,use_limit_quantity,send_type,support_transfer,press_limit_num,auto_refund, | orig_price,unit,use_limit_rule,use_limit_quantity,send_type,support_transfer,press_limit_num,auto_refund, | ||||
| conditions,valid_type,valid_start_date,valid_end_date,pick_start_date,pick_end_date,valid_days,credit_price, | conditions,valid_type,valid_start_date,valid_end_date,pick_start_date,pick_end_date,valid_days,credit_price, | ||||
| content_type,source_type | |||||
| content_type,source_type,merchant_type | |||||
| from wx_coupon where `tenant_id` = #{tenantId} | from wx_coupon where `tenant_id` = #{tenantId} | ||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and `id` = #{id} | and `id` = #{id} | ||||
| @@ -1350,6 +1362,7 @@ | |||||
| <result column="credit_refund" jdbcType="INTEGER" property="creditRefund"/> | <result column="credit_refund" jdbcType="INTEGER" property="creditRefund"/> | ||||
| <result column="content_type" property="contentType"/> | <result column="content_type" property="contentType"/> | ||||
| <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | <result column="source_type" jdbcType="INTEGER" property="sourceType"/> | ||||
| <result column="merchant_type" jdbcType="INTEGER" property="merchantType"/> | |||||
| <result column="product_type" jdbcType="INTEGER" property="productType"/> | <result column="product_type" jdbcType="INTEGER" property="productType"/> | ||||
| <result column="category_id" jdbcType="INTEGER" property="categoryId"/> | <result column="category_id" jdbcType="INTEGER" property="categoryId"/> | ||||
| @@ -1369,7 +1382,7 @@ | |||||
| c.`valid_days`,c.`price`,c.tail_price,c.orig_price,c.`unit`,c.`remain_inventory`,c.`inventory`, | c.`valid_days`,c.`price`,c.tail_price,c.orig_price,c.`unit`,c.`remain_inventory`,c.`inventory`, | ||||
| c.`status`,c.`create_date`,c.`update_date`,c.`business`,c.`sub_business`, | c.`status`,c.`create_date`,c.`update_date`,c.`business`,c.`sub_business`, | ||||
| c.`auto_refund`,c.`credit_price`,c.`credit_refund`, | c.`auto_refund`,c.`credit_price`,c.`credit_refund`, | ||||
| c.content_type,c.source_type,c.product_type,c.category_id, | |||||
| c.content_type,c.source_type,c.merchant_type,c.product_type,c.category_id, | |||||
| poi.coupon_channel_id,poi.spu_id,poi.status poi_status,poi.status_desc,poi.last_status,poi.last_status_desc | poi.coupon_channel_id,poi.spu_id,poi.status poi_status,poi.status_desc,poi.last_status,poi.last_status_desc | ||||
| from wx_coupon c | from wx_coupon c | ||||
| left join tt_coupon_channel_poi poi on poi.id = c.id | left join tt_coupon_channel_poi poi on poi.id = c.id | ||||
| @@ -1406,6 +1419,10 @@ | |||||
| and c.`source_type` = #{sourceType} | and c.`source_type` = #{sourceType} | ||||
| </if> | </if> | ||||
| <if test=" null != merchantType "> | |||||
| and c.`merchant_type` = #{merchantType} | |||||
| </if> | |||||
| <if test=" null != couponChannelId "> | <if test=" null != couponChannelId "> | ||||
| and poi.`coupon_channel_id` = #{couponChannelId} | and poi.`coupon_channel_id` = #{couponChannelId} | ||||
| </if> | </if> | ||||