admin
2019-11-23 51a4ff5d777028d52a19c314a99f796334cb7b51
fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml
@@ -14,8 +14,13 @@
         jdbcType="INTEGER" />
      <result column="da_createtime" property="createTime" jdbcType="TIMESTAMP" />
      <result column="da_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
      <result column="da_ip" property="ipInfo" jdbcType="VARCHAR" />
      <result column="da_channel" property="channel" jdbcType="VARCHAR" />
      <result column="da_imei" property="imei" jdbcType="VARCHAR" />
      <result column="da_idfa" property="idfa" jdbcType="VARCHAR" />
      <result column="da_mac" property="mac" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List">da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime
   <sql id="Base_Column_List">da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime,da_ip,da_channel,da_imei,da_idfa,da_mac
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
@@ -23,30 +28,45 @@
      <include refid="Base_Column_List" />
      from yeshi_ec_device_active where da_id = #{id,jdbcType=BIGINT}
   </select>
   <select id="selectByDeviceAndPlatform" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_device_active where da_device = #{device} and
      da_platform=#{platform}
      da_platform=#{platform} order by da_id desc limit 1
   </select>
   <select id="selectFirstByDeviceAndPlatform" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_device_active where da_device = #{device} and
      da_platform=#{platform} limit 1
   </select>
   <select id="selectByDeviceToeknMd5AndPlatform" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_device_active where da_device_token_md5 =
      #{deviceTokenMd5} and da_platform=#{platform}
   </select>
   <select id="selectFirst" resultMap="BaseResultMap"
      parameterType="java.lang.String">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_device_active where da_device = #{0} order by da_id
      limit 1
   </select>
   <select id="selectFirstByImei" resultMap="BaseResultMap"
      parameterType="java.lang.String">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_device_active where da_imei = #{0} order by da_id limit
      1
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
      yeshi_ec_device_active where da_id = #{id,jdbcType=BIGINT}
   </delete>
      yeshi_ec_device_active where da_id = #{id,jdbcType=BIGINT}</delete>
   <insert id="insert" parameterType="com.yeshi.fanli.entity.push.DeviceActive"
      useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_device_active
      (da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime)
      (da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime,da_ip,da_channel,da_imei,da_idfa,da_mac)
      values
      (#{id,jdbcType=BIGINT},#{platform,jdbcType=INTEGER},#{device,jdbcType=VARCHAR},#{deviceTokenMd5,jdbcType=VARCHAR},#{deviceToken,jdbcType=VARCHAR},#{versionCode,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
      (#{id,jdbcType=BIGINT},#{platform,jdbcType=INTEGER},#{device,jdbcType=VARCHAR},#{deviceTokenMd5,jdbcType=VARCHAR},#{deviceToken,jdbcType=VARCHAR},#{versionCode,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{ipInfo,jdbcType=VARCHAR},#{channel,jdbcType=VARCHAR},#{imei,jdbcType=VARCHAR},#{idfa,jdbcType=VARCHAR},#{mac,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.DeviceActive"
      useGeneratedKeys="true" keyProperty="id">
@@ -60,6 +80,11 @@
         <if test="versionCode != null">da_version_code,</if>
         <if test="createTime != null">da_createtime,</if>
         <if test="updateTime != null">da_updatetime,</if>
         <if test="ipInfo != null">da_ip,</if>
         <if test="channel != null">da_channel,</if>
         <if test="imei != null">da_imei,</if>
         <if test="idfa != null">da_idfa,</if>
         <if test="mac != null">da_mac,</if>
      </trim>
      values
      <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -71,6 +96,11 @@
         <if test="versionCode != null">#{versionCode,jdbcType=INTEGER},</if>
         <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="ipInfo != null">#{ipInfo,jdbcType=VARCHAR},</if>
         <if test="channel != null">#{channel,jdbcType=VARCHAR},</if>
         <if test="imei != null">#{imei,jdbcType=VARCHAR},</if>
         <if test="idfa != null">#{idfa,jdbcType=VARCHAR},</if>
         <if test="mac != null">#{mac,jdbcType=VARCHAR},</if>
      </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.DeviceActive">update
@@ -81,8 +111,10 @@
      #{deviceToken,jdbcType=VARCHAR},da_version_code =
      #{versionCode,jdbcType=INTEGER},da_createtime =
      #{createTime,jdbcType=TIMESTAMP},da_updatetime =
      #{updateTime,jdbcType=TIMESTAMP} where da_id = #{id,jdbcType=BIGINT}
   </update>
      #{updateTime,jdbcType=TIMESTAMP},da_ip = #{ipInfo,jdbcType=VARCHAR}
      ,da_channel =#{channel,jdbcType=VARCHAR},da_imei
      =#{imei,jdbcType=VARCHAR} ,da_idfa =#{idfa,jdbcType=VARCHAR} ,da_mac
      =#{mac,jdbcType=VARCHAR} where da_id = #{id,jdbcType=BIGINT}</update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.DeviceActive">
      update yeshi_ec_device_active
      <set>
@@ -94,6 +126,11 @@
         <if test="versionCode != null">da_version_code=#{versionCode,jdbcType=INTEGER},</if>
         <if test="createTime != null">da_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">da_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="ipInfo != null">da_ip=#{ipInfo,jdbcType=VARCHAR},</if>
         <if test="channel !=null">da_channel =#{channel,jdbcType=VARCHAR},</if>
         <if test="imei !=null">da_imei =#{imei,jdbcType=VARCHAR},</if>
         <if test="idfa !=null">da_idfa =#{idfa,jdbcType=VARCHAR},</if>
         <if test="mac !=null">da_mac =#{mac,jdbcType=VARCHAR},</if>
      </set>
      where da_id = #{id,jdbcType=BIGINT}
   </update>