yujian
2020-06-09 554de444b87aab5f93cb1593a8095612cf9479a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
<mapper namespace="com.yeshi.fanli.dao.mybatis.goods.ShareGoodsTextTemplateMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">
        <id column="st_id" property="id" jdbcType="BIGINT"/>
        <result column="st_uid" property="uid" jdbcType="BIGINT"/>
        <result column="st_share_text_template" property="shareTextTemplate" jdbcType="VARCHAR"/>
        <result column="st_share_coupon_text_template" property="shareCouponTextTemplate" jdbcType="VARCHAR"/>
        <result column="st_share_taolijin_text_template" property="shareTaoLiJinTextTemplate" jdbcType="VARCHAR"/>
        <result column="st_share_jd_text_template" property="shareJDTextTemplate" jdbcType="VARCHAR"/>
        <result column="st_share_jd_text_template_coupon" property="shareJDTextTemplateCoupon" jdbcType="VARCHAR"/>
        <result column="st_share_pdd_text_template" property="sharePDDTextTemplate" jdbcType="VARCHAR"/>
        <result column="st_share_pdd_text_template_coupon" property="sharePDDTextTemplateCoupon" jdbcType="VARCHAR"/>
        <result column="st_share_vip_text_template" property="shareVIPTextTemplate" jdbcType="VARCHAR"/>
        <result column="st_share_vip_text_template_coupon" property="shareVIPTextTemplateCoupon" jdbcType="VARCHAR"/>
        <result column="st_share_suning_text_template" property="shareSuNingTextTemplate" jdbcType="VARCHAR"/>
        <result column="st_share_suning_text_template_coupon" property="shareSuNingTextTemplateCoupon" jdbcType="VARCHAR"/>
        <result column="st_create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="st_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    </resultMap>
    <sql id="Base_Column_List">st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_share_taolijin_text_template,st_share_jd_text_template,st_share_jd_text_template_coupon,st_share_pdd_text_template,st_share_pdd_text_template_coupon,st_share_vip_text_template,st_share_vip_text_template_coupon,st_share_suning_text_template,st_share_suning_text_template_coupon,st_create_time,st_update_time</sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_share_template where st_id = #{id,jdbcType=BIGINT}
    </select>
 
    <select id="selectByUid" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_share_template where st_uid = #{0}
    </select>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_share_template where st_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_share_template (st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_share_taolijin_text_template,st_share_jd_text_template,st_share_jd_text_template_coupon,st_share_pdd_text_template,st_share_pdd_text_template_coupon,st_share_vip_text_template,st_share_vip_text_template_coupon,st_share_suning_text_template,st_share_suning_text_template_coupon,st_create_time,st_update_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{shareTextTemplate,jdbcType=VARCHAR},#{shareCouponTextTemplate,jdbcType=VARCHAR},#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},#{shareJDTextTemplate,jdbcType=VARCHAR},#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},#{sharePDDTextTemplate,jdbcType=VARCHAR},#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},#{shareVIPTextTemplate,jdbcType=VARCHAR},#{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},#{shareSuNingTextTemplate,jdbcType=VARCHAR},#{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_share_template
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">st_id,</if>
      <if test="uid != null">st_uid,</if>
      <if test="shareTextTemplate != null">st_share_text_template,</if>
      <if test="shareCouponTextTemplate != null">st_share_coupon_text_template,</if>
      <if test="shareTaoLiJinTextTemplate != null">st_share_taolijin_text_template,</if>
      <if test="shareJDTextTemplate != null">st_share_jd_text_template,</if>
      <if test="shareJDTextTemplateCoupon != null">st_share_jd_text_template_coupon,</if>
      <if test="sharePDDTextTemplate != null">st_share_pdd_text_template,</if>
      <if test="sharePDDTextTemplateCoupon != null">st_share_pdd_text_template_coupon,</if>
      <if test="shareVIPTextTemplate != null">st_share_vip_text_template,</if>
      <if test="shareVIPTextTemplateCoupon != null">st_share_vip_text_template_coupon,</if>
      <if test="shareSuNingTextTemplate != null">st_share_suning_text_template,</if>
      <if test="shareSuNingTextTemplateCoupon != null">st_share_suning_text_template_coupon,</if>
      <if test="createTime != null">st_create_time,</if>
      <if test="updateTime != null">st_update_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
      <if test="shareTextTemplate != null">#{shareTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareCouponTextTemplate != null">#{shareCouponTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareTaoLiJinTextTemplate != null">#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareJDTextTemplate != null">#{shareJDTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareJDTextTemplateCoupon != null">#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="sharePDDTextTemplate != null">#{sharePDDTextTemplate,jdbcType=VARCHAR},</if>
      <if test="sharePDDTextTemplateCoupon != null">#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="shareVIPTextTemplate != null">#{shareVIPTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareVIPTextTemplateCoupon != null">#{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="shareSuNingTextTemplate != null">#{shareSuNingTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareSuNingTextTemplateCoupon != null">#{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">update yeshi_ec_share_template set st_uid = #{uid,jdbcType=BIGINT},st_share_text_template = #{shareTextTemplate,jdbcType=VARCHAR},st_share_coupon_text_template = #{shareCouponTextTemplate,jdbcType=VARCHAR},st_share_taolijin_text_template = #{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},st_share_jd_text_template = #{shareJDTextTemplate,jdbcType=VARCHAR},st_share_jd_text_template_coupon = #{shareJDTextTemplateCoupon,jdbcType=VARCHAR},st_share_pdd_text_template = #{sharePDDTextTemplate,jdbcType=VARCHAR},st_share_pdd_text_template_coupon = #{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},st_share_vip_text_template = #{shareVIPTextTemplate,jdbcType=VARCHAR},st_share_vip_text_template_coupon = #{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},st_share_suning_text_template = #{shareSuNingTextTemplate,jdbcType=VARCHAR},st_share_suning_text_template_coupon = #{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},st_create_time = #{createTime,jdbcType=TIMESTAMP},st_update_time = #{updateTime,jdbcType=TIMESTAMP} where st_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">update yeshi_ec_share_template
    <set>
      <if test="uid != null">st_uid=#{uid,jdbcType=BIGINT},</if>
      <if test="shareTextTemplate != null">st_share_text_template=#{shareTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareCouponTextTemplate != null">st_share_coupon_text_template=#{shareCouponTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareTaoLiJinTextTemplate != null">st_share_taolijin_text_template=#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareJDTextTemplate != null">st_share_jd_text_template=#{shareJDTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareJDTextTemplateCoupon != null">st_share_jd_text_template_coupon=#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="sharePDDTextTemplate != null">st_share_pdd_text_template=#{sharePDDTextTemplate,jdbcType=VARCHAR},</if>
      <if test="sharePDDTextTemplateCoupon != null">st_share_pdd_text_template_coupon=#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="shareVIPTextTemplate != null">st_share_vip_text_template=#{shareVIPTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareVIPTextTemplateCoupon != null">st_share_vip_text_template_coupon=#{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="shareSuNingTextTemplate != null">st_share_suning_text_template=#{shareSuNingTextTemplate,jdbcType=VARCHAR},</if>
      <if test="shareSuNingTextTemplateCoupon != null">st_share_suning_text_template_coupon=#{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},</if>
      <if test="createTime != null">st_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">st_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where st_id = #{id,jdbcType=BIGINT}
  </update>
</mapper>