Explorar el Código

优化新增清空聊天信息接口

fangqing hace 6 meses
padre
commit
bf5a782449

+ 1 - 4
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/CommunityChatMsgController.java

@@ -124,7 +124,7 @@ public class CommunityChatMsgController extends BaseController {
     public AjaxResult clearChat(Long otherUserId) {
         Long userId = SecurityUtils.getUserId();
         try {
-            boolean update = communityChatMsgService.update(
+            communityChatMsgService.update(
                     null,
                     new UpdateWrapper<CommunityChatMsg>()
                             .eq("sender_id", userId)
@@ -134,9 +134,6 @@ public class CommunityChatMsgController extends BaseController {
                                 wrapper.ne("is_delete", 1).or().isNull("is_delete");
                             })
             );
-            if (!update) {
-                return success("清空聊天记录失败!");
-            }
         } catch (Exception e) {
             throw new ProjectException();
         }