update 更新通过岗位ID查询用户
This commit is contained in:
parent
3bd801894d
commit
5b337b4d2f
@ -85,6 +85,14 @@ public interface UserService {
|
|||||||
*/
|
*/
|
||||||
List<UserDTO> selectUsersByDeptIds(List<Long> deptIds);
|
List<UserDTO> selectUsersByDeptIds(List<Long> deptIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过岗位ID查询用户
|
||||||
|
*
|
||||||
|
* @param postIds 岗位ids
|
||||||
|
* @return 用户
|
||||||
|
*/
|
||||||
|
List<UserDTO> selectUsersByPostIds(List<Long> postIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户并返回任务指派的列表,支持分页
|
* 查询用户并返回任务指派的列表,支持分页
|
||||||
*
|
*
|
||||||
|
@ -696,6 +696,28 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
return BeanUtil.copyToList(list, UserDTO.class);
|
return BeanUtil.copyToList(list, UserDTO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过岗位ID查询用户
|
||||||
|
*
|
||||||
|
* @param postIds 岗位ids
|
||||||
|
* @return 用户
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<UserDTO> selectUsersByPostIds(List<Long> postIds) {
|
||||||
|
if (CollUtil.isEmpty(postIds)) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过岗位ID获取用户岗位信息
|
||||||
|
List<SysUserPost> userPosts = userPostMapper.selectList(
|
||||||
|
new LambdaQueryWrapper<SysUserPost>().in(SysUserPost::getPostId, postIds));
|
||||||
|
|
||||||
|
// 获取用户ID列表
|
||||||
|
Set<Long> userIds = StreamUtils.toSet(userPosts, SysUserPost::getUserId);
|
||||||
|
|
||||||
|
return selectListByIds(new ArrayList<>(userIds));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户并返回任务指派的列表,支持分页
|
* 查询用户并返回任务指派的列表,支持分页
|
||||||
*
|
*
|
||||||
|
@ -152,7 +152,7 @@ public class WfTaskAssigneeServiceImpl implements IWfTaskAssigneeService, Handle
|
|||||||
case USER -> userService.selectListByIds(ids);
|
case USER -> userService.selectListByIds(ids);
|
||||||
case ROLE -> userService.selectUsersByRoleIds(ids);
|
case ROLE -> userService.selectUsersByRoleIds(ids);
|
||||||
case DEPT -> userService.selectUsersByDeptIds(ids);
|
case DEPT -> userService.selectUsersByDeptIds(ids);
|
||||||
// todo 岗位后续待添加
|
case POST -> userService.selectUsersByPostIds(ids);
|
||||||
default -> Collections.emptyList();
|
default -> Collections.emptyList();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user