Commit af6e283f49eb9a880ee838164e57d1c5e8cc13e0
1 parent
782314f1
✨ feat(im): 增加群管理的完善
Showing
2 changed files
with
18 additions
and
4 deletions
yudao-module-im/src/main/java/cn/iocoder/yudao/module/im/controller/admin/manager/group/ImGroupMemberManagerController.java
| @@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.RestController; | @@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.RestController; | ||
| 23 | import java.util.Collections; | 23 | import java.util.Collections; |
| 24 | import java.util.List; | 24 | import java.util.List; |
| 25 | import java.util.Map; | 25 | import java.util.Map; |
| 26 | -import java.util.Set; | ||
| 27 | 26 | ||
| 28 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 27 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | 28 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| @@ -40,12 +39,12 @@ public class ImGroupMemberManagerController { | @@ -40,12 +39,12 @@ public class ImGroupMemberManagerController { | ||
| 40 | private AdminUserApi adminUserApi; | 39 | private AdminUserApi adminUserApi; |
| 41 | 40 | ||
| 42 | @GetMapping("/list") | 41 | @GetMapping("/list") |
| 43 | - @Operation(summary = "获得群成员列表") | 42 | + @Operation(summary = "获得群成员列表(含已退群成员,由前端按需过滤)") |
| 44 | @Parameter(name = "groupId", description = "群编号", required = true, example = "1024") | 43 | @Parameter(name = "groupId", description = "群编号", required = true, example = "1024") |
| 45 | @PreAuthorize("@ss.hasPermission('im:manager:group:query')") | 44 | @PreAuthorize("@ss.hasPermission('im:manager:group:query')") |
| 46 | public CommonResult<List<ImGroupMemberManagerRespVO>> getGroupMemberList(@RequestParam("groupId") Long groupId) { | 45 | public CommonResult<List<ImGroupMemberManagerRespVO>> getGroupMemberList(@RequestParam("groupId") Long groupId) { |
| 47 | - // 1. 查询有效群成员 | ||
| 48 | - List<ImGroupMemberDO> members = groupMemberService.getActiveGroupMemberListByGroupId(groupId); | 46 | + // 1. 查询群全部成员(含已退群) |
| 47 | + List<ImGroupMemberDO> members = groupMemberService.getGroupMemberListByGroupId(groupId); | ||
| 49 | if (CollUtil.isEmpty(members)) { | 48 | if (CollUtil.isEmpty(members)) { |
| 50 | return success(Collections.emptyList()); | 49 | return success(Collections.emptyList()); |
| 51 | } | 50 | } |
yudao-module-im/src/main/java/cn/iocoder/yudao/module/im/controller/admin/manager/group/vo/member/ImGroupMemberManagerRespVO.java
| @@ -18,7 +18,22 @@ public class ImGroupMemberManagerRespVO { | @@ -18,7 +18,22 @@ public class ImGroupMemberManagerRespVO { | ||
| 18 | @Schema(description = "用户头像") | 18 | @Schema(description = "用户头像") |
| 19 | private String avatar; | 19 | private String avatar; |
| 20 | 20 | ||
| 21 | + @Schema(description = "组内显示名", example = "三哥") | ||
| 22 | + private String displayUserName; | ||
| 23 | + | ||
| 24 | + @Schema(description = "群显示备注", example = "技术交流群") | ||
| 25 | + private String displayGroupName; | ||
| 26 | + | ||
| 27 | + @Schema(description = "是否免打扰", example = "false") | ||
| 28 | + private Boolean muted; | ||
| 29 | + | ||
| 30 | + @Schema(description = "成员状态", example = "0") | ||
| 31 | + private Integer status; // 参见 CommonStatusEnum 枚举类 | ||
| 32 | + | ||
| 21 | @Schema(description = "入群时间") | 33 | @Schema(description = "入群时间") |
| 22 | private LocalDateTime joinTime; | 34 | private LocalDateTime joinTime; |
| 23 | 35 | ||
| 36 | + @Schema(description = "退群时间") | ||
| 37 | + private LocalDateTime quitTime; | ||
| 38 | + | ||
| 24 | } | 39 | } |