AppYohoToutiaoNewUidMapper.xml 6.69 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.AppYohoToutiaoNewUidMapper" >
  <resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
    <id column="order_code" property="orderCode" jdbcType="VARCHAR" />
    <result column="wakeup_date" property="wakeupDate" jdbcType="INTEGER" />
    <result column="udid" property="udid" jdbcType="VARCHAR" />
    <result column="client_type" property="clientType" jdbcType="INTEGER" />
    <result column="idfa" property="idfa" jdbcType="VARCHAR" />
    <result column="imei" property="imei" jdbcType="VARCHAR" />
    <result column="order_time" property="orderTime" jdbcType="INTEGER" />
    <result column="uid" property="uid" jdbcType="INTEGER" />
    <result column="union_type" property="unionType" jdbcType="VARCHAR" />
    <result column="source" property="source" jdbcType="INTEGER" />
    <result column="create_time" property="createTime" jdbcType="INTEGER" />
    <result column="date_id" property="dateId" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    order_code, wakeup_date, udid, client_type, idfa, imei, order_time, uid, union_type, 
    source, create_time, date_id
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from app_yoho_toutiao_new_uid
    where order_code = #{orderCode,jdbcType=VARCHAR}
  </select>
  <select id="selectCountByDateId" resultType="java.lang.Integer" >
    select count(1)
    from app_yoho_toutiao_new_uid
    where date_id = #{dateId}
  </select>
  <select id="selectByDateId" resultMap="BaseResultMap" >
    select <include refid="Base_Column_List" />
    from app_yoho_toutiao_new_uid
    where date_id = #{dateId}
    limit #{startIndex},#{pageSize}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from app_yoho_toutiao_new_uid
    where order_code = #{orderCode,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
    insert into app_yoho_toutiao_new_uid (order_code, wakeup_date, udid, 
      client_type, idfa, imei, 
      order_time, uid, union_type, 
      source, create_time, date_id
      )
    values (#{orderCode,jdbcType=VARCHAR}, #{wakeupDate,jdbcType=INTEGER}, #{udid,jdbcType=VARCHAR}, 
      #{clientType,jdbcType=INTEGER}, #{idfa,jdbcType=VARCHAR}, #{imei,jdbcType=VARCHAR}, 
      #{orderTime,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{unionType,jdbcType=VARCHAR}, 
      #{source,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{dateId,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
    insert into app_yoho_toutiao_new_uid
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="orderCode != null" >
        order_code,
      </if>
      <if test="wakeupDate != null" >
        wakeup_date,
      </if>
      <if test="udid != null" >
        udid,
      </if>
      <if test="clientType != null" >
        client_type,
      </if>
      <if test="idfa != null" >
        idfa,
      </if>
      <if test="imei != null" >
        imei,
      </if>
      <if test="orderTime != null" >
        order_time,
      </if>
      <if test="uid != null" >
        uid,
      </if>
      <if test="unionType != null" >
        union_type,
      </if>
      <if test="source != null" >
        source,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="dateId != null" >
        date_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="orderCode != null" >
        #{orderCode,jdbcType=VARCHAR},
      </if>
      <if test="wakeupDate != null" >
        #{wakeupDate,jdbcType=INTEGER},
      </if>
      <if test="udid != null" >
        #{udid,jdbcType=VARCHAR},
      </if>
      <if test="clientType != null" >
        #{clientType,jdbcType=INTEGER},
      </if>
      <if test="idfa != null" >
        #{idfa,jdbcType=VARCHAR},
      </if>
      <if test="imei != null" >
        #{imei,jdbcType=VARCHAR},
      </if>
      <if test="orderTime != null" >
        #{orderTime,jdbcType=INTEGER},
      </if>
      <if test="uid != null" >
        #{uid,jdbcType=INTEGER},
      </if>
      <if test="unionType != null" >
        #{unionType,jdbcType=VARCHAR},
      </if>
      <if test="source != null" >
        #{source,jdbcType=INTEGER},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=INTEGER},
      </if>
      <if test="dateId != null" >
        #{dateId,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
    update app_yoho_toutiao_new_uid
    <set >
      <if test="wakeupDate != null" >
        wakeup_date = #{wakeupDate,jdbcType=INTEGER},
      </if>
      <if test="udid != null" >
        udid = #{udid,jdbcType=VARCHAR},
      </if>
      <if test="clientType != null" >
        client_type = #{clientType,jdbcType=INTEGER},
      </if>
      <if test="idfa != null" >
        idfa = #{idfa,jdbcType=VARCHAR},
      </if>
      <if test="imei != null" >
        imei = #{imei,jdbcType=VARCHAR},
      </if>
      <if test="orderTime != null" >
        order_time = #{orderTime,jdbcType=INTEGER},
      </if>
      <if test="uid != null" >
        uid = #{uid,jdbcType=INTEGER},
      </if>
      <if test="unionType != null" >
        union_type = #{unionType,jdbcType=VARCHAR},
      </if>
      <if test="source != null" >
        source = #{source,jdbcType=INTEGER},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=INTEGER},
      </if>
      <if test="dateId != null" >
        date_id = #{dateId,jdbcType=INTEGER},
      </if>
    </set>
    where order_code = #{orderCode,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.AppYohoToutiaoNewUid" >
    update app_yoho_toutiao_new_uid
    set wakeup_date = #{wakeupDate,jdbcType=INTEGER},
      udid = #{udid,jdbcType=VARCHAR},
      client_type = #{clientType,jdbcType=INTEGER},
      idfa = #{idfa,jdbcType=VARCHAR},
      imei = #{imei,jdbcType=VARCHAR},
      order_time = #{orderTime,jdbcType=INTEGER},
      uid = #{uid,jdbcType=INTEGER},
      union_type = #{unionType,jdbcType=VARCHAR},
      source = #{source,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=INTEGER},
      date_id = #{dateId,jdbcType=INTEGER}
    where order_code = #{orderCode,jdbcType=VARCHAR}
  </update>
</mapper>