From 1fb2cfb2bcb152bee03f8a332700241693cfd9b6 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期二, 16 八月 2022 13:37:00 +0800
Subject: [PATCH] bug处理

---
 src/main/resources/mapper/MessageDao.xml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/MessageDao.xml b/src/main/resources/mapper/MessageDao.xml
index f3e16e6..d79041f 100644
--- a/src/main/resources/mapper/MessageDao.xml
+++ b/src/main/resources/mapper/MessageDao.xml
@@ -9,11 +9,12 @@
     </resultMap>
 
     <select id="getAllMessageByGroup" resultMap="GroupMessageVoMap">
-        select u.real_name, m.text, m.ctime
+        select `user`.real_name, m.text, m.ctime
         from message m
-        join user u on m.user_id = u.id
+                 JOIN report ON report.id = m.user_id
+                 JOIN `user` ON `user`.id = report.user_id
         where m.group_id = #{groupId}
-        order by m.ctime desc
+        order by m.ctime asc
     </select>
 
 

--
Gitblit v1.8.0