Explorar el Código

修改聊天记录

Wei Ruifeng hace 4 años
padre
commit
df0c329e8d

+ 1 - 1
lift-ud-service/src/main/java/cn/com/ty/lift/ud/chat/service/impl/ChatMsgServiceImpl.java

@@ -50,7 +50,7 @@ public class ChatMsgServiceImpl extends ServiceImpl<ChatMsgMapper, ChatMsgEntity
     public RestResponse messageHistory(ChatMsgQuery req) throws Exception {
         List<IMMessage> data = new ArrayList<>();
         List list2 = redis.get("ALLCHATS:" + req.getSessionid(), List.class);
-        if (!list2.isEmpty()) {
+        if (list2 != null) {
             for (Object i : list2) {
                 ObjectMapper objectMapper = new ObjectMapper();
                 IMMessage convertValue = objectMapper.convertValue(i, IMMessage.class);