|
|
|
@ -214,13 +214,16 @@ public class AuthAdminServiceImpl extends ServiceImpl<AuthAdminDao, AuthAdmin> i
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<AuthAdmin> getUserByDeptCode(String deptCode) {
|
|
|
|
|
|
|
|
|
|
DeptEntity deptEntity = deptService.selectByCode(deptCode);
|
|
|
|
|
List<DeptUserEntity> deptUserEntitys = deptUserDao.selectList(new LambdaQueryWrapper<DeptUserEntity>().eq(DeptUserEntity::getDeptId, deptEntity.getId()));
|
|
|
|
|
List<Long> userIds = deptUserEntitys.stream()
|
|
|
|
|
.map(DeptUserEntity::getUserId)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
List<AuthAdmin> authAdmins = authAdminDao.selectList(new LambdaQueryWrapper<AuthAdmin>().in(AuthAdmin::getId, userIds));
|
|
|
|
|
List<AuthAdmin> authAdmins = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isEmpty(userIds)){
|
|
|
|
|
return authAdmins;
|
|
|
|
|
}
|
|
|
|
|
authAdmins = authAdminDao.selectList(new LambdaQueryWrapper<AuthAdmin>().in(AuthAdmin::getId, userIds));
|
|
|
|
|
return authAdmins;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|