From 6b8ab82d1d7fb9d44d85eeb1dfd2e36d3c28c9cf Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 10 六月 2019 11:30:21 +0800
Subject: [PATCH] 客服消息修改,新版大淘客数据添加

---
 fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgDeviceReadStateMapper.xml |   38 ++++++++++++++++----------------------
 1 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgDeviceReadStateMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgDeviceReadStateMapper.xml
index 441c578..3019f33 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgDeviceReadStateMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgDeviceReadStateMapper.xml
@@ -15,8 +15,10 @@
 			jdbcType="TIMESTAMP" />
 		<result column="mdrs_update_time" property="updateTime"
 			jdbcType="TIMESTAMP" />
+		<result column="mdrs_latest_content" property="latestContent"
+			jdbcType="VARCHAR" />
 	</resultMap>
-	<sql id="Base_Column_List">mdrs_id,mdrs_device,mdrs_platform,mdrs_type,mdrs_read_time,mdrs_unread_count,mdrs_create_time,mdrs_update_time
+	<sql id="Base_Column_List">mdrs_id,mdrs_device,mdrs_platform,mdrs_type,mdrs_read_time,mdrs_unread_count,mdrs_create_time,mdrs_update_time,mdrs_latest_content
 	</sql>
 	<select id="selectByPrimaryKey" resultMap="BaseResultMap"
 		parameterType="java.lang.Long">
@@ -25,33 +27,27 @@
 		from yeshi_ec_msg_device_read_state where mdrs_id =
 		#{id,jdbcType=BIGINT}
 	</select>
-
-
 	<select id="selectByDeviceAndPlatformAndType" resultMap="BaseResultMap">
 		select
 		<include refid="Base_Column_List" />
 		from yeshi_ec_msg_device_read_state where mdrs_device=#{device} and
 		mdrs_platform=#{platform} and mdrs_type=#{type}
 	</select>
-
-
 	<select id="listByDeviceAndPlatform" resultMap="BaseResultMap">
 		select
 		<include refid="Base_Column_List" />
 		from yeshi_ec_msg_device_read_state where mdrs_device=#{device} and
 		mdrs_platform=#{platform}
 	</select>
-
-
 	<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
 		yeshi_ec_msg_device_read_state where mdrs_id = #{id,jdbcType=BIGINT}
 	</delete>
 	<insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState"
 		useGeneratedKeys="true" keyProperty="id">insert into
 		yeshi_ec_msg_device_read_state
-		(mdrs_id,mdrs_device,mdrs_platform,mdrs_type,mdrs_read_time,mdrs_unread_count,mdrs_create_time,mdrs_update_time)
+		(mdrs_id,mdrs_device,mdrs_platform,mdrs_type,mdrs_read_time,mdrs_unread_count,mdrs_create_time,mdrs_update_time,mdrs_latest_content)
 		values
-		(#{id,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{platform,jdbcType=INTEGER},#{type,jdbcType=VARCHAR},#{readTime,jdbcType=TIMESTAMP},#{unReadCount,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
+		(#{id,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{platform,jdbcType=INTEGER},#{type,jdbcType=VARCHAR},#{readTime,jdbcType=TIMESTAMP},#{unReadCount,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{latestContent,jdbcType=VARCHAR})
 	</insert>
 	<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState"
 		useGeneratedKeys="true" keyProperty="id">
@@ -65,6 +61,7 @@
 			<if test="unReadCount != null">mdrs_unread_count,</if>
 			<if test="createTime != null">mdrs_create_time,</if>
 			<if test="updateTime != null">mdrs_update_time,</if>
+			<if test="latestContent != null">mdrs_latest_content,</if>
 		</trim>
 		values
 		<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -76,6 +73,7 @@
 			<if test="unReadCount != null">#{unReadCount,jdbcType=INTEGER},</if>
 			<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
 			<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
+			<if test="latestContent != null">#{latestContent,jdbcType=VARCHAR}</if>
 		</trim>
 	</insert>
 	<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState">update
@@ -86,8 +84,9 @@
 		#{readTime,jdbcType=TIMESTAMP},mdrs_unread_count =
 		#{unReadCount,jdbcType=INTEGER},mdrs_create_time =
 		#{createTime,jdbcType=TIMESTAMP},mdrs_update_time =
-		#{updateTime,jdbcType=TIMESTAMP} where mdrs_id = #{id,jdbcType=BIGINT}
-	</update>
+		#{updateTime,jdbcType=TIMESTAMP} ,mdrs_latest_content
+		=#{latestContent,jdbcType=VARCHAR} where mdrs_id =
+		#{id,jdbcType=BIGINT}</update>
 	<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState">
 		update yeshi_ec_msg_device_read_state
 		<set>
@@ -98,18 +97,13 @@
 			<if test="unReadCount != null">mdrs_unread_count=#{unReadCount,jdbcType=INTEGER},</if>
 			<if test="createTime != null">mdrs_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
 			<if test="updateTime != null">mdrs_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
+			<if test="id !=null">mdrs_id =#{id,jdbcType=BIGINT},</if>
+			<if test="latestContent !=null">mdrs_latest_content =#{latestContent,jdbcType=VARCHAR},
+			</if>
 		</set>
 		where mdrs_id = #{id,jdbcType=BIGINT}
 	</update>
-
-
-	<update id="setAllMsgRead">
-		update yeshi_ec_msg_device_read_state set
-		mdrs_read_time=now(),mdrs_unread_count=0,mdrs_update_time=now()
-		where
-		mdrs_device=#{device} and
-		mdrs_platform=#{platform}
-	</update>
-
-
+	<update id="setAllMsgRead">update yeshi_ec_msg_device_read_state set
+		mdrs_read_time=now(),mdrs_unread_count=0,mdrs_update_time=now() where
+		mdrs_device=#{device} and mdrs_platform=#{platform}</update>
 </mapper>

--
Gitblit v1.8.0