update m2pool 客服聊天室列表页面不再展示不存在聊天信息的聊天室

This commit is contained in:
yyb
2026-01-27 11:24:17 +08:00
parent 3c524675fa
commit 12a1ba3445
2 changed files with 3 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
package com.m2pool.chat.service.impl;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
@@ -64,7 +65,6 @@ public class ChatRoomServiceImpl extends ServiceImpl<ChatRoomMapper, ChatRoom> i
//1.查找当前客服对应的聊天室
roomList = chatRoomMapper.findRoomList(ids,roomPageVo.getSendDateTime());
// if (roomList.isEmpty()){
// TableDataInfo tableDataInfo = new TableDataInfo();
// tableDataInfo.setCode(HttpStatus.ERROR);

View File

@@ -34,12 +34,8 @@
GROUP BY send_email
</select>
<select id="findRoomIdsByCustomerEmail" resultType="java.lang.Long">
select room_id from chat_message where send_email = #{userEmail} group by room_id
select room_id from chat_message group by room_id
UNION
select room_id from chat_message_history where send_email = #{userEmail} group by room_id
-- 不再展示不存在聊天信息的聊天室
-- UNION
-- select id as room_id from chat_room where user_two_email = #{userEmail}
select room_id from chat_message_history group by room_id
</select>
</mapper>