活动赠送券 来源字段
This commit is contained in:
@@ -75,6 +75,8 @@ public class TbActivateInRecord implements Serializable {
|
||||
|
||||
private String couponJson;
|
||||
|
||||
private String source;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
@@ -220,5 +222,12 @@ public class TbActivateInRecord implements Serializable {
|
||||
this.couponJson = couponJson;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -468,6 +468,7 @@ public class MemberService {
|
||||
record.setSourceFlowId(flowId);
|
||||
record.setUseStartTime(start);
|
||||
record.setUseEndTime(end);
|
||||
record.setSource("activate");
|
||||
record.setCouponJson(activateInRecordService.getCouponJson(activate,tbShopCoupon,null));
|
||||
actGiveRecords.add(record);
|
||||
} else if (tbShopCoupon.getType() == 2) {
|
||||
@@ -487,6 +488,7 @@ public class MemberService {
|
||||
record.setSourceFlowId(flowId);
|
||||
record.setUseStartTime(start);
|
||||
record.setUseEndTime(end);
|
||||
record.setSource("activate");
|
||||
record.setCouponJson(activateInRecordService.getCouponJson(activate,tbShopCoupon,actPro));
|
||||
actGiveRecords.add(record);
|
||||
}
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="couponJson" column="coupon_json" jdbcType="VARCHAR"/>
|
||||
<result property="source" column="source" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, vip_user_id, coupon_id, name, type, pro_id, full_amount, discount_amount, num, over_num, shop_id, source_act_id, source_flow_id, use_start_time, use_end_time, create_time, update_time, coupon_json </sql>
|
||||
, vip_user_id, coupon_id, name, type, pro_id, full_amount, discount_amount, num, over_num, shop_id, source_act_id, source_flow_id, use_start_time, use_end_time, create_time, update_time, coupon_json, `source` </sql>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="TbActivateInRecordMap">
|
||||
@@ -97,6 +98,9 @@
|
||||
<if test="couponJson != null and couponJson != ''">
|
||||
and coupon_json = #{couponJson}
|
||||
</if>
|
||||
<if test="source != null and source != ''">
|
||||
and source = #{source}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -105,22 +109,22 @@
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_in_record(vip_user_id, coupon_id, name, type, pro_id, full_amount, discount_amount, num,
|
||||
over_num, shop_id, source_act_id, source_flow_id, use_start_time,
|
||||
use_end_time, create_time, update_time, coupon_json)
|
||||
use_end_time, create_time, update_time, coupon_json, source)
|
||||
values (#{vipUserId}, #{couponId}, #{name}, #{type}, #{proId}, #{fullAmount}, #{discountAmount}, #{num},
|
||||
#{overNum}, #{shopId}, #{sourceActId}, #{sourceFlowId}, #{useStartTime}, #{useEndTime}, #{createTime},
|
||||
#{updateTime}, #{couponJson})
|
||||
#{updateTime}, #{couponJson}, #{source})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tb_activate_in_record(vip_user_id, coupon_id, name, type, pro_id, full_amount, discount_amount, num,
|
||||
over_num, shop_id, source_act_id, source_flow_id, use_start_time, use_end_time, create_time, update_time,
|
||||
coupon_json)
|
||||
coupon_json,source)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.vipUserId}, #{entity.couponId}, #{entity.name}, #{entity.type}, #{entity.proId},
|
||||
#{entity.fullAmount}, #{entity.discountAmount}, #{entity.num}, #{entity.overNum}, #{entity.shopId},
|
||||
#{entity.sourceActId}, #{entity.sourceFlowId}, #{entity.useStartTime}, #{entity.useEndTime},
|
||||
#{entity.createTime}, #{entity.updateTime}, #{entity.couponJson})
|
||||
#{entity.createTime}, #{entity.updateTime}, #{entity.couponJson},#{entity.source})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user