根据公司ID,查询该公司下的所有用户。
This commit is contained in:
parent
53bf2a584e
commit
a4b640f28c
@ -471,4 +471,22 @@ public class UserController {
|
||||
|
||||
return postName;
|
||||
}
|
||||
|
||||
@GetMapping("/getUserBycompanyId")
|
||||
@Operation(summary = "根据公司ID( 此公司ID,需要查询到对应的部门ID),查询该部门下的用户")
|
||||
@Parameter(name = "companyId", description = "公司ID", required = true, example = "10000083")
|
||||
@DataPermission(enable = false)
|
||||
public CommonResult<List<UserSimpleRespVO>> getUserBycompanyId(@RequestParam("companyId") Long companyId) {
|
||||
//1 = 113 中鼐智能科技(江西)有限公司, 10000083 = 136 世瑞华科技(深圳)有限公司 10000061 = 166 中鼐智能科技(江西)有限公司(高安)
|
||||
if(companyId == 1L) {
|
||||
companyId = 113L;
|
||||
}else if(companyId == 10000083L) {
|
||||
companyId = 136L;
|
||||
}else {
|
||||
companyId = 166L ;
|
||||
}
|
||||
List<DeptDO> deptDOS = deptService.getChildDept(companyId);
|
||||
List<AdminUserDO> userDOS = userService.getUserListByDeptIds(convertList(deptDOS, DeptDO::getId), CommonStatusEnum.ENABLE.getStatus());
|
||||
return success(BeanUtils.toBean(userDOS, UserSimpleRespVO.class));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user