From b469ab33391a3c2c0a031e17eea5de7a069f0c67 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 19 九月 2019 18:34:26 +0800 Subject: [PATCH] 抖音广告监测 --- fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml | 42 +++++++++++++++++------------------------- 1 files changed, 17 insertions(+), 25 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml index ac231b1..59031df 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml @@ -15,55 +15,47 @@ <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" /> </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,da_ip - </sql> + <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</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long"> select <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} order by da_id desc limit 1 + 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 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 + from yeshi_ec_device_active where da_device = #{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_ip) + (da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime,da_ip,da_channel) 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},#{ipInfo,jdbcType=VARCHAR}) - </insert> + (#{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})</insert> <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.DeviceActive" useGeneratedKeys="true" keyProperty="id"> insert into yeshi_ec_device_active @@ -77,7 +69,7 @@ <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> </trim> values <trim prefix="(" suffix=")" suffixOverrides=","> @@ -90,6 +82,7 @@ <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> </trim> </insert> <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.DeviceActive">update @@ -100,22 +93,21 @@ #{deviceToken,jdbcType=VARCHAR},da_version_code = #{versionCode,jdbcType=INTEGER},da_createtime = #{createTime,jdbcType=TIMESTAMP},da_updatetime = - #{updateTime,jdbcType=TIMESTAMP},da_ip = - #{ipInfo,jdbcType=VARCHAR} - where da_id = #{id,jdbcType=BIGINT} - </update> + #{updateTime,jdbcType=TIMESTAMP},da_ip = #{ipInfo,jdbcType=VARCHAR} + ,da_channel =#{channel,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> <if test="platform != null">da_platform=#{platform,jdbcType=INTEGER},</if> <if test="device != null">da_device=#{device,jdbcType=VARCHAR},</if> - <if test="deviceTokenMd5 != null">da_device_token_md5=#{deviceTokenMd5,jdbcType=VARCHAR}, - </if> + <if test="deviceTokenMd5 != null">da_device_token_md5=#{deviceTokenMd5,jdbcType=VARCHAR},</if> <if test="deviceToken != null">da_device_token=#{deviceToken,jdbcType=VARCHAR},</if> <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> </set> where da_id = #{id,jdbcType=BIGINT} </update> -- Gitblit v1.8.0