新增接口 机构用户数据封装

This commit is contained in:
ly19960718 2021-06-10 16:38:26 +08:00
parent eaf839fd31
commit cd150f58eb

View File

@ -53,7 +53,8 @@ public class departmentBaseController extends DefaultBaseController {
private IRoleUserService roleUserService; private IRoleUserService roleUserService;
@Autowired @Autowired
private IUserService userService; private IUserService userService;
@Autowired
private IPositionService positionService;
/** /**
@ -116,9 +117,11 @@ public class departmentBaseController extends DefaultBaseController {
return list; return list;
} }
List<String> listUsers = roleUserService.listUserId(roleDTO.getRoleId()); List<String> listUsers = roleUserService.listUserId(roleDTO.getRoleId());
//
List<String> userIds = departmentUserService.listUserId(departmentId, listUsers); List<String> userIds = departmentUserService.listUserId(departmentId, listUsers);
list = userService.listByUserIds(userIds); list = userService.listByUserIds(userIds);
for (UserDTO userDTO : list) {
}
return list; return list;
} }
@ -134,6 +137,22 @@ public class departmentBaseController extends DefaultBaseController {
return list; return list;
} }
@ApiOperation(value = "用户详情", notes = "用户详情用户列表")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get-by-user-id/{userId}")
public UserDTO getByUserId(@PathVariable("userId") String userId){
UserDTO userDTO = userService.get(userId);
return userDTO;
}