TencentMktActivityMapper.xml 7.3 KB
<?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" />
    <result column="old_user" property="oldUser" jdbcType="VARCHAR"/>
    <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" />
    <result column="button_name" property="buttonName" jdbcType="VARCHAR"/>
  </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, 
    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
  </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>