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/GroupDao.xml |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/main/resources/mapper/GroupDao.xml b/src/main/resources/mapper/GroupDao.xml
index 14923e0..9cb2fd2 100644
--- a/src/main/resources/mapper/GroupDao.xml
+++ b/src/main/resources/mapper/GroupDao.xml
@@ -3,15 +3,17 @@
 <mapper namespace="com.example.jz.dao.GroupDao">
 
     <resultMap id="GroupUserVoMap" type="com.example.jz.modle.vo.GroupUserVo">
-        <result property="userId" column="user_id" />
-        <result property="userName" column="real_name" />
-        <result property="banSpeech" column="ban_speech" />
+        <result property="userId" column="user_id"/>
+        <result property="groupId" column="group_id"/>
+        <result property="userName" column="real_name"/>
+        <result property="banSpeech" column="ban_speech"/>
     </resultMap>
 
-    <select id="getAllUser" resultType="com.example.jz.modle.vo.GroupUserVo">
-        select group_user.user_id,group_user.ban_speech,user.real_name
-        from group_user
-        join user on group_user.user_id = user.id
+    <select id="getAllUser" resultMap="GroupUserVoMap">
+        select group_user.user_id,group_user.group_id, group_user.ban_speech, user.real_name
+        FROM group_user
+                 JOIN report ON report.id = group_user.user_id
+                 JOIN `user` ON `user`.id = report.user_id
         where group_id = #{groupId}
     </select>
 

--
Gitblit v1.8.0