|
|
@@ -18,10 +18,11 @@
|
|
|
<result property="msgurl" column="msgurl" jdbcType="VARCHAR"/>
|
|
|
<result property="content" column="content" jdbcType="VARCHAR"/>
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="provinceType" column="province_type" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="ChatMsgAllSql">
|
|
|
- id, msgid, action_type, from_id, from_name, tolist, tolist_name, roomid, type, room_name, msgtime, msgtype, msgurl, content, create_time
|
|
|
+ id, msgid, action_type, from_id, from_name, tolist, tolist_name, roomid, type, room_name, msgtime, msgtype, msgurl, content, create_time, province_type
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
@@ -35,30 +36,30 @@
|
|
|
<!--新增所有列-->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
insert into chat_msg(msgid, action_type, from_id, from_name, tolist, tolist_name, roomid, type, room_name,
|
|
|
- msgtime, msgtype, msgurl, content, create_time)
|
|
|
+ msgtime, msgtype, msgurl, content, create_time, province_type)
|
|
|
values (#{msgid}, #{actionType}, #{fromId}, #{fromName}, #{tolist}, #{tolistName}, #{roomid}, #{type},
|
|
|
- #{roomName}, #{msgtime}, #{msgtype}, #{msgurl}, #{content}, #{createTime})
|
|
|
+ #{roomName}, #{msgtime}, #{msgtype}, #{msgurl}, #{content}, #{createTime},#{provinceType})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertBatch">
|
|
|
insert into chat_msg(msgid, action_type, from_id, from_name, tolist, tolist_name, roomid, type, room_name,
|
|
|
- msgtime, msgtype, msgurl, content, create_time)
|
|
|
+ msgtime, msgtype, msgurl, content, create_time, province_type)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.msgid}, #{entity.actionType}, #{entity.fromId}, #{entity.fromName}, #{entity.tolist},
|
|
|
#{entity.tolistName}, #{entity.roomid}, #{entity.type}, #{entity.roomName}, #{entity.msgtime},
|
|
|
- #{entity.msgtype}, #{entity.msgurl}, #{entity.content}, #{entity.createTime})
|
|
|
+ #{entity.msgtype}, #{entity.msgurl}, #{entity.content}, #{entity.createTime},#{entity.provinceType})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
insert into chat_msg(msgid, action_type, from_id, from_name, tolist, tolist_name, roomid, type, room_name,
|
|
|
- msgtime, msgtype, msgurl, content, create_time)
|
|
|
+ msgtime, msgtype, msgurl, content, create_time, province_type)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.msgid}, #{entity.actionType}, #{entity.fromId}, #{entity.fromName}, #{entity.tolist},
|
|
|
#{entity.tolistName}, #{entity.roomid}, #{entity.type}, #{entity.roomName}, #{entity.msgtime},
|
|
|
- #{entity.msgtype}, #{entity.msgurl}, #{entity.content}, #{entity.createTime})
|
|
|
+ #{entity.msgtype}, #{entity.msgurl}, #{entity.content}, #{entity.createTime},#{entity.provinceType})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
msgid = values(msgid),
|
|
|
@@ -75,6 +76,8 @@
|
|
|
msgurl = values(msgurl),
|
|
|
content = values(content),
|
|
|
create_time = values(create_time)
|
|
|
+ province_type = values(province_type)
|
|
|
+
|
|
|
</insert>
|
|
|
|
|
|
<!--通过主键修改数据-->
|
|
|
@@ -123,6 +126,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime},
|
|
|
</if>
|
|
|
+ <if test="provinceType != null">
|
|
|
+ province_type = #{provinceType},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
@@ -179,6 +185,9 @@
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="provinceType != null">
|
|
|
+ and province_type = #{provinceType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
@@ -235,6 +244,9 @@
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="provinceType != null">
|
|
|
+ and province_type = #{provinceType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|