From e260d06750811a6be0ad1abb85634ced13cc7d94 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 27 二月 2019 10:28:34 +0800
Subject: [PATCH] 其他消息表结构修改

---
 fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgOtherDetailMapper.xml |   41 +++++++++++++++--------------------------
 1 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgOtherDetailMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgOtherDetailMapper.xml
index 7cb6c87..8395eb8 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgOtherDetailMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/msg/MsgOtherDetailMapper.xml
@@ -9,14 +9,16 @@
 		<result column="mo_content" property="content" jdbcType="VARCHAR" />
 		<result column="mo_beizhu" property="beiZhu" jdbcType="VARCHAR" />
 		<result column="mo_read" property="read" jdbcType="BOOLEAN" />
+		<result column="mo_source_id" property="sourceId" jdbcType="BIGINT" />
 		<result column="mo_create_time" property="createTime" jdbcType="TIMESTAMP" />
 		<result column="mo_update_time" property="updateTime" jdbcType="TIMESTAMP" />
 		<association property="user" column="mo_uid"
 			javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
 			<id column="mo_uid" property="id" jdbcType="BIGINT" />
 		</association>
+
 	</resultMap>
-	<sql id="Base_Column_List">mo_id,mo_uid,mo_type,mo_content,mo_beizhu,mo_read,mo_create_time,mo_update_time
+	<sql id="Base_Column_List">mo_id,mo_uid,mo_type,mo_content,mo_beizhu,mo_read,mo_create_time,mo_update_time,mo_source_id
 	</sql>
 	<select id="selectByPrimaryKey" resultMap="BaseResultMap"
 		parameterType="java.lang.Long">
@@ -24,34 +26,22 @@
 		<include refid="Base_Column_List" />
 		from yeshi_ec_msg_other where mo_id = #{id,jdbcType=BIGINT}
 	</select>
-
-
 	<select id="listByUid" resultMap="BaseResultMap">
 		select
 		<include refid="Base_Column_List" />
 		from yeshi_ec_msg_other where mo_uid = #{uid,jdbcType=BIGINT} order by
 		mo_create_time desc limit #{start},#{count}
 	</select>
-
-
 	<select id="countByUid" resultType="java.lang.Long"
-		parameterType="java.lang.Long">
-		select
-		count(mo_id)
-		from yeshi_ec_msg_other where mo_uid =
-		#{uid,jdbcType=BIGINT}
-	</select>
-
-
-
+		parameterType="java.lang.Long">select count(mo_id) from yeshi_ec_msg_other where mo_uid
+		= #{uid,jdbcType=BIGINT}</select>
 	<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
-		yeshi_ec_msg_other where mo_id = #{id,jdbcType=BIGINT}
-	</delete>
+		yeshi_ec_msg_other where mo_id = #{id,jdbcType=BIGINT}</delete>
 	<insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOtherDetail"
 		useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_other
-		(mo_id,mo_uid,mo_type,mo_content,mo_beizhu,mo_read,mo_create_time,mo_update_time)
+		(mo_id,mo_uid,mo_type,mo_content,mo_beizhu,mo_read,mo_create_time,mo_update_time,mo_source_id)
 		values
-		(#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
+		(#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{sourceId,jdbcType=BIGINT})
 	</insert>
 	<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOtherDetail"
 		useGeneratedKeys="true" keyProperty="id">
@@ -65,6 +55,7 @@
 			<if test="read != null">mo_read,</if>
 			<if test="createTime != null">mo_create_time,</if>
 			<if test="updateTime != null">mo_update_time,</if>
+			<if test="sourceId != null">mo_source_id,</if>
 		</trim>
 		values
 		<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -76,6 +67,7 @@
 			<if test="read != null">#{read,jdbcType=BOOLEAN},</if>
 			<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
 			<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
+			<if test="sourceId != null">#{sourceId,jdbcType=BIGINT}</if>
 		</trim>
 	</insert>
 	<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOtherDetail">update
@@ -85,7 +77,8 @@
 		#{beiZhu,jdbcType=VARCHAR},mo_read =
 		#{read,jdbcType=BOOLEAN},mo_create_time =
 		#{createTime,jdbcType=TIMESTAMP},mo_update_time =
-		#{updateTime,jdbcType=TIMESTAMP} where mo_id = #{id,jdbcType=BIGINT}
+		#{updateTime,jdbcType=TIMESTAMP} ,mo_source_id
+		=#{sourceId,jdbcType=BIGINT} where mo_id = #{id,jdbcType=BIGINT}
 	</update>
 	<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOtherDetail">
 		update yeshi_ec_msg_other
@@ -97,15 +90,11 @@
 			<if test="read != null">mo_read=#{read,jdbcType=BOOLEAN},</if>
 			<if test="createTime != null">mo_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
 			<if test="updateTime != null">mo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
+			<if test="sourceId !=null">mo_source_id =#{sourceId,jdbcType=BIGINT},</if>
 		</set>
 		where mo_id = #{id,jdbcType=BIGINT}
 	</update>
-
-	<update id="setMsgReadByUid" parameterType="java.lang.Long">
-		update
-		yeshi_ec_msg_other
-		set mo_read=1
-		where mo_uid = #{uid,jdbcType=BIGINT}
+	<update id="setMsgReadByUid" parameterType="java.lang.Long">update
+		yeshi_ec_msg_other set mo_read=1 where mo_uid = #{uid,jdbcType=BIGINT}
 	</update>
-
 </mapper>

--
Gitblit v1.8.0