Blame view

dal/src/main/resources/META-INF/mybatis/TencentMktActivityMapper.xml 7.3 KB
tanling authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?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.yoho.unions.dal.ITencentMktActivityDAO" >
  <resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.TencentMktActivity" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="activity_code" property="activityCode" jdbcType="VARCHAR" />
    <result column="activity_name" property="activityName" jdbcType="VARCHAR" />
    <result column="h5_title" property="h5Title" jdbcType="VARCHAR" />
    <result column="activity_normal_pic" property="activityNormalPic" jdbcType="VARCHAR" />
    <result column="activity_end_pic" property="activityEndPic" jdbcType="VARCHAR" />
    <result column="share_img_url" property="shareImgUrl" jdbcType="VARCHAR" />
    <result column="share_title" property="shareTitle" jdbcType="VARCHAR" />
    <result column="share_content" property="shareContent" jdbcType="VARCHAR" />
    <result column="pc_link" property="pcLink" jdbcType="VARCHAR" />
    <result column="activity_desc" property="activityDesc" jdbcType="VARCHAR" />
    <result column="begin_time" property="beginTime" jdbcType="INTEGER" />
    <result column="end_time" property="endTime" jdbcType="INTEGER" />
    <result column="coupon_pic" property="couponPic" jdbcType="VARCHAR" />
    <result column="button_link" property="buttonLink" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="INTEGER" />
    <result column="status" property="status" jdbcType="TINYINT" />
    <result column="second_screen_pic" property="secondScreenPic" jdbcType="VARCHAR" />
    <result column="coupon_id" property="couponId" jdbcType="VARCHAR" />
    <result column="user_not_order" property="userNotOrder" jdbcType="VARCHAR" />
Ge authored
25
    <result column="old_user" property="oldUser" jdbcType="VARCHAR"/>
tanling authored
26 27 28 29 30
    <result column="sms_content" property="smsContent" jdbcType="VARCHAR" />
    <result column="old_user_popup_content" property="oldUserPopupContent" jdbcType="VARCHAR" />
    <result column="old_user_button_name" property="oldUserButtonName" jdbcType="VARCHAR" />
    <result column="old_user_button_link" property="oldUserButtonLink" jdbcType="VARCHAR" />
    <result column="buttom_text_pic" property="buttomTextPic" jdbcType="VARCHAR" />
Ge authored
31
    <result column="button_name" property="buttonName" jdbcType="VARCHAR"/>
tanling authored
32 33 34 35
  </resultMap>
  <sql id="Base_Column_List" >
    id, activity_code, activity_name, h5_title, activity_normal_pic, activity_end_pic, 
    share_img_url, share_title, share_content, pc_link, activity_desc, begin_time, end_time, 
Ge authored
36
    coupon_pic, button_link, create_time, status, second_screen_pic, coupon_id, user_not_order,sms_content,old_user_popup_content,old_user_button_name,old_user_button_link,buttom_text_pic,old_user,button_name
tanling authored
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from tencent_mkt_activity
    where id = #{id,jdbcType=INTEGER}
  </select>
  <select id="selectByActivityCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select
    <include refid="Base_Column_List" />
    from tencent_mkt_activity
    where activity_code = #{activityCode,jdbcType=VARCHAR}
    AND status=1
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from tencent_mkt_activity
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.yoho.unions.dal.model.TencentMktActivity" >
    insert into tencent_mkt_activity (id, activity_code, activity_name, 
      h5_title, activity_normal_pic, activity_end_pic, 
      share_img_url, share_title, share_content, 
      pc_link, activity_desc, begin_time, 
      end_time, coupon_pic, button_link, 
      create_time, status, coupon_id)
    values (#{id,jdbcType=INTEGER}, #{activityCode,jdbcType=VARCHAR}, #{activityName,jdbcType=VARCHAR}, 
      #{h5Title,jdbcType=VARCHAR}, #{activityNormalPic,jdbcType=VARCHAR}, #{activityEndPic,jdbcType=VARCHAR}, 
      #{shareImgUrl,jdbcType=VARCHAR}, #{shareTitle,jdbcType=VARCHAR}, #{shareContent,jdbcType=VARCHAR}, 
      #{pcLink,jdbcType=VARCHAR}, #{activityDesc,jdbcType=VARCHAR}, #{beginTime,jdbcType=INTEGER}, 
      #{endTime,jdbcType=INTEGER}, #{couponPic,jdbcType=VARCHAR}, #{buttonLink,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}, #{couponId})
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.TencentMktActivity" >
    update tencent_mkt_activity
    <set >
      <if test="activityCode != null" >
        activity_code = #{activityCode,jdbcType=VARCHAR},
      </if>
      <if test="activityName != null" >
        activity_name = #{activityName,jdbcType=VARCHAR},
      </if>
      <if test="h5Title != null" >
        h5_title = #{h5Title,jdbcType=VARCHAR},
      </if>
      <if test="activityNormalPic != null" >
        activity_normal_pic = #{activityNormalPic,jdbcType=VARCHAR},
      </if>
      <if test="activityEndPic != null" >
        activity_end_pic = #{activityEndPic,jdbcType=VARCHAR},
      </if>
      <if test="shareImgUrl != null" >
        share_img_url = #{shareImgUrl,jdbcType=VARCHAR},
      </if>
      <if test="shareTitle != null" >
        share_title = #{shareTitle,jdbcType=VARCHAR},
      </if>
      <if test="shareContent != null" >
        share_content = #{shareContent,jdbcType=VARCHAR},
      </if>
      <if test="pcLink != null" >
        pc_link = #{pcLink,jdbcType=VARCHAR},
      </if>
      <if test="activityDesc != null" >
        activity_desc = #{activityDesc,jdbcType=VARCHAR},
      </if>
      <if test="beginTime != null" >
        begin_time = #{beginTime,jdbcType=INTEGER},
      </if>
      <if test="endTime != null" >
        end_time = #{endTime,jdbcType=INTEGER},
      </if>
      <if test="couponPic != null" >
        coupon_pic = #{couponPic,jdbcType=VARCHAR},
      </if>
      <if test="buttonLink != null" >
        button_link = #{buttonLink,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.TencentMktActivity" >
    update tencent_mkt_activity
    set activity_code = #{activityCode,jdbcType=VARCHAR},
      activity_name = #{activityName,jdbcType=VARCHAR},
      h5_title = #{h5Title,jdbcType=VARCHAR},
      activity_normal_pic = #{activityNormalPic,jdbcType=VARCHAR},
      activity_end_pic = #{activityEndPic,jdbcType=VARCHAR},
      share_img_url = #{shareImgUrl,jdbcType=VARCHAR},
      share_title = #{shareTitle,jdbcType=VARCHAR},
      share_content = #{shareContent,jdbcType=VARCHAR},
      pc_link = #{pcLink,jdbcType=VARCHAR},
      activity_desc = #{activityDesc,jdbcType=VARCHAR},
      begin_time = #{beginTime,jdbcType=INTEGER},
      end_time = #{endTime,jdbcType=INTEGER},
      coupon_pic = #{couponPic,jdbcType=VARCHAR},
      button_link = #{buttonLink,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=INTEGER},
      status = #{status,jdbcType=TINYINT},
      coupon_id=#{couponId}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>