瀏覽代碼

1.小组添加老师名称返回

yuanliang 1 年之前
父節點
當前提交
73f78b3e25

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantGroupServiceImpl.java

@@ -109,10 +109,13 @@ public class TenantGroupServiceImpl extends ServiceImpl<TenantGroupMapper, Tenan
                         .list().stream().map(ImGroup::getId).collect(Collectors.toList());
                 existImgGroupIds.addAll(imgGroupIds);
             }
+            List<Long> adminIdList = records.stream().map(TenantGroupWrapper.TenantGroup::getAdminId).distinct().collect(Collectors.toList());
+            Map<Long, com.yonge.cooleshow.biz.dal.entity.SysUser> mapByIds = sysUserService.getMapByIds(adminIdList);
 
             for (TenantGroupWrapper.TenantGroup record : records) {
                 record.setGroupUserCount(groupBy.getOrDefault(record.getId(), 0));
                 record.setImGroupExist(existImgGroupIds.contains(record.getImGroupId()));
+                record.setAdminName(mapByIds.get(record.getAdminId()).getUsername());
             }
         }
         return iPage;

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantGroupWrapper.java

@@ -78,6 +78,9 @@ public class TenantGroupWrapper {
         @ApiModelProperty("管理员ID")
         private Long adminId;
 
+        @ApiModelProperty("管理员名称")
+        private String adminName;
+
         @ApiModelProperty("IM群聊ID")
         private String imGroupId;