|
@@ -76,6 +76,18 @@ public class DeptController {
|
|
|
@PreAuthorize("@ss.hasPermission('system:dept:query')")
|
|
|
public CommonResult<List<DeptRespVO>> getDeptList(DeptListReqVO reqVO) {
|
|
|
List<DeptDO> list = deptService.getDeptList(reqVO);
|
|
|
+ for (DeptDO L :list){
|
|
|
+ DeptRespVO newDept =BeanUtils.toBean(L, DeptRespVO.class);
|
|
|
+ List<Long> leaderUserIds = newDept.getLeaderUserId();
|
|
|
+ List<AdminUserDO> userList = new ArrayList<>();
|
|
|
+ if (leaderUserIds.size()>0) {
|
|
|
+ for (Long leaderUserId : leaderUserIds) {
|
|
|
+ AdminUserDO user = (leaderUserId != null) ? adminUserService.getUser(leaderUserId) : null;
|
|
|
+ userList.add(user);
|
|
|
+ }
|
|
|
+ newDept.setUser(userList);
|
|
|
+ }
|
|
|
+ }
|
|
|
return success(BeanUtils.toBean(list, DeptRespVO.class));
|
|
|
}
|
|
|
|
|
@@ -105,7 +117,6 @@ public class DeptController {
|
|
|
newDept.setUser(userList);
|
|
|
}
|
|
|
return success(newDept);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|