Commit 68b972e4 by 徐高华

退群冗余当时的群主

parent 5047c627
...@@ -21,7 +21,7 @@ public interface GroupChatUserMapper { ...@@ -21,7 +21,7 @@ public interface GroupChatUserMapper {
public int insert(TabGroupChatUser tabHaobanGroupChatUser); public int insert(TabGroupChatUser tabHaobanGroupChatUser);
public int dismiss(@Param("idList") List<Long> chatUserIdList); public int dismiss(@Param("idList") List<Long> chatUserIdList, @Param("ownerId") String ownerId);
public int update(TabGroupChatUser tabHaobanGroupChatUser); public int update(TabGroupChatUser tabHaobanGroupChatUser);
......
...@@ -249,7 +249,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -249,7 +249,7 @@ public class GroupChatServiceImpl implements GroupChatService {
@Override @Override
public void updateChatEnterpriseId(String wxEnterpriseId, String enterpriseId, List<Long> groupChatIdList) { public void updateChatEnterpriseId(String wxEnterpriseId, String enterpriseId, List<Long> groupChatIdList) {
this.groupChatMapper.updateChatEnterpriseId(wxEnterpriseId, enterpriseId, groupChatIdList , 0); this.groupChatMapper.updateChatEnterpriseId(wxEnterpriseId, enterpriseId, groupChatIdList, 0);
// 更新后重新同步群数据 // 更新后重新同步群数据
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("groupChatIdList", groupChatIdList); json.put("groupChatIdList", groupChatIdList);
...@@ -643,7 +643,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -643,7 +643,7 @@ public class GroupChatServiceImpl implements GroupChatService {
// 流水会员数 // 流水会员数
int quitMemberCount = 0; int quitMemberCount = 0;
if (CollectionUtils.isNotEmpty(deleteIdList)) { if (CollectionUtils.isNotEmpty(deleteIdList)) {
this.groupChatUserMapper.dismiss(deleteIdList); this.groupChatUserMapper.dismiss(deleteIdList, chat.getStaffId());
quitCount = deleteIdList.size(); quitCount = deleteIdList.size();
for (Long userId : deleteIdList) { for (Long userId : deleteIdList) {
TabGroupChatUser user = userMap.get(userId); TabGroupChatUser user = userMap.get(userId);
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<result column="join_remark" property="joinRemark" /> <result column="join_remark" property="joinRemark" />
<result column="join_state" property="joinState" /> <result column="join_state" property="joinState" />
<result column="admin_flag" property="adminFlag"/> <result column="admin_flag" property="adminFlag"/>
<result column="quit_staff_id" property="quitStaffId"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
chat_user_id, chat_user_id,
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
quit_scene, quit_scene,
join_scene, join_scene,
join_remark, join_remark,
join_state , invitor_user_name , admin_flag join_state , invitor_user_name , admin_flag , quit_staff_id
</sql> </sql>
<!-- ===================== 新增 ======================== --> <!-- ===================== 新增 ======================== -->
<insert id="insert" <insert id="insert"
...@@ -105,7 +106,7 @@ ...@@ -105,7 +106,7 @@
<!-- =====================删除==================== --> <!-- =====================删除==================== -->
<update id="dismiss"> <update id="dismiss">
UPDATE tab_haoban_group_chat_user SET status_flag = 2 , update_time=now() , user_quit_time = now() , quit_scene = 0 WHERE chat_user_id in UPDATE tab_haoban_group_chat_user SET status_flag = 2 , update_time=now() , user_quit_time = now() , quit_scene = 0 , quit_staff_id = #{ownerId} WHERE chat_user_id in
<foreach collection="idList" close=")" open="(" index="index" item="id" separator=","> <foreach collection="idList" close=")" open="(" index="index" item="id" separator=",">
#{id} #{id}
</foreach> </foreach>
...@@ -188,7 +189,14 @@ ...@@ -188,7 +189,14 @@
a.join_state joinState a.join_state joinState
from tab_haoban_group_chat_user a from tab_haoban_group_chat_user a
left join tab_haoban_group_chat b on a.group_chat_id = b.group_chat_id left join tab_haoban_group_chat b on a.group_chat_id = b.group_chat_id
left join tab_haoban_staff c on b.staff_id = c.staff_id <choose>
<when test="status==2">
left join tab_haoban_staff c on a.quit_staff_id = c.staff_id
</when>
<otherwise>
left join tab_haoban_staff c on b.staff_id = c.staff_id
</otherwise>
</choose>
where a.wx_enterprise_id = #{wxEnterpriseId} and a.delete_flag = 0 where a.wx_enterprise_id = #{wxEnterpriseId} and a.delete_flag = 0
<if test="null != groupChatId"> <if test="null != groupChatId">
and a.group_chat_id = #{groupChatId} and a.group_chat_id = #{groupChatId}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment