From c3362b1179d9e6f588a209ef9b6ef40dfa9499a0 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期五, 23 十二月 2022 14:20:24 +0800 Subject: [PATCH] fix: 群成员重复 --- src/main/java/com/example/jz/controller/WxAppController.java | 2 ++ src/main/resources/mapper/GroupDao.xml | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/example/jz/controller/WxAppController.java b/src/main/java/com/example/jz/controller/WxAppController.java index 9361afe..8d09512 100644 --- a/src/main/java/com/example/jz/controller/WxAppController.java +++ b/src/main/java/com/example/jz/controller/WxAppController.java @@ -121,10 +121,12 @@ role = user.getRole(); id = user.getId(); } + User user1 = userDao.selectOne(new QueryWrapper<User>().eq("user_mobile", phone_info.getPurePhoneNumber())); HashMap<String, Object> loginMessage = new HashMap<>(); loginMessage.put("id", id); loginMessage.put("token", token); loginMessage.put("role", role); + loginMessage.put("time",user1.getUserIdcard()); return R.ok(loginMessage); } diff --git a/src/main/resources/mapper/GroupDao.xml b/src/main/resources/mapper/GroupDao.xml index 9cb2fd2..e0d8f12 100644 --- a/src/main/resources/mapper/GroupDao.xml +++ b/src/main/resources/mapper/GroupDao.xml @@ -15,6 +15,7 @@ JOIN report ON report.id = group_user.user_id JOIN `user` ON `user`.id = report.user_id where group_id = #{groupId} + GROUP BY user.id </select> </mapper> -- Gitblit v1.8.0