|
|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
-<mapper namespace="cn.reghao.tnb.user.app.db.mapper.GroupInfoMapper">
|
|
|
+<mapper namespace="cn.reghao.tnb.content.app.chat.db.mapper.GroupInfoMapper">
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into chat_group_info
|
|
|
(`id`,`deleted`,`create_time`,`update_time`,`group_id`,`name`,`avatar`,`profile`,`owner_id`)
|
|
|
@@ -14,23 +14,23 @@
|
|
|
where group_id=#{groupId}
|
|
|
</update>
|
|
|
|
|
|
- <select id="findByGroupId" resultType="cn.reghao.tnb.user.app.model.po.GroupInfo">
|
|
|
+ <select id="findByGroupId" resultType="cn.reghao.tnb.content.app.chat.model.po.GroupInfo">
|
|
|
select * from chat_group_info where id=#{groupId}
|
|
|
</select>
|
|
|
- <select id="findDetailByGroupId" resultType="cn.reghao.tnb.user.app.model.dto.group.GroupDetailRet">
|
|
|
+ <select id="findDetailByGroupId" resultType="cn.reghao.tnb.content.app.chat.model.dto.group.GroupDetailRet">
|
|
|
select groupInfo.id as groupId,groupInfo.name as groupName,groupInfo.avatar,groupInfo.profile,
|
|
|
groupInfo.owner_id as ownerId,date_format(groupInfo.create_time,'%Y-%m-%d %H:%i:%s') as createdAt
|
|
|
from chat_group_info groupInfo
|
|
|
where groupInfo.id=#{groupId}
|
|
|
</select>
|
|
|
- <select id="findGroupsByUserId" resultType="cn.reghao.tnb.user.app.model.dto.group.GroupInfoRet">
|
|
|
+ <select id="findGroupsByUserId" resultType="cn.reghao.tnb.content.app.chat.model.dto.group.GroupInfoRet">
|
|
|
select groupInfo.id,groupInfo.name as groupName,groupInfo.profile as groupProfile,groupInfo.avatar,
|
|
|
groupMember.owner,groupMember.disturb
|
|
|
from chat_group_info groupInfo
|
|
|
inner join group_member groupMember
|
|
|
on groupInfo.id=groupMember.group_id and groupMember.user_id=#{userId}
|
|
|
</select>
|
|
|
- <select id="findDialogGroupInfo" resultType="cn.reghao.tnb.user.app.model.dto.ChatUserInfo">
|
|
|
+ <select id="findDialogGroupInfo" resultType="cn.reghao.tnb.content.app.chat.model.dto.ChatUserInfo">
|
|
|
select group_id as receiverId,`name`,avatar
|
|
|
from chat_group_info
|
|
|
where group_id=#{groupId}
|