mirror of https://gitee.com/stylefeng/roses
【7.2.5】【user】更新获取用户列表的接口
parent
a9df61789a
commit
5638037e8d
|
@ -140,7 +140,7 @@ public interface UserServiceApi {
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @date 2022/9/25 10:14
|
* @date 2022/9/25 10:14
|
||||||
*/
|
*/
|
||||||
List<SysUserDTO> getUserInfoList(Set<Long> userIdSet);
|
List<SysUserDTO> getUserInfoList(List<Long> userIdSet);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部用户ID(剔除被删除的)
|
* 查询全部用户ID(剔除被删除的)
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class SysUserRequest extends BaseRequest {
|
||||||
/**
|
/**
|
||||||
* 用户id集合(用在批量删除)
|
* 用户id集合(用在批量删除)
|
||||||
*/
|
*/
|
||||||
@NotEmpty(message = "用户id集合不能为空", groups = batchDelete.class)
|
@NotEmpty(message = "用户id集合不能为空", groups = {batchDelete.class, getUserList.class})
|
||||||
@ChineseDescription("用户id集合(用在批量删除)")
|
@ChineseDescription("用户id集合(用在批量删除)")
|
||||||
private List<Long> userIds;
|
private List<Long> userIds;
|
||||||
|
|
||||||
|
@ -271,6 +271,12 @@ public class SysUserRequest extends BaseRequest {
|
||||||
public @interface reg {
|
public @interface reg {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数校验分组:获取用户列表,通过用户id集合
|
||||||
|
*/
|
||||||
|
public @interface getUserList {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -329,4 +329,16 @@ public class SysUserController {
|
||||||
public ResponseData<List<SimpleDict>> getUserListByConditions(SysUserRequest sysUserRequest) {
|
public ResponseData<List<SimpleDict>> getUserListByConditions(SysUserRequest sysUserRequest) {
|
||||||
return new SuccessResponseData<>(sysUserService.getUserListByConditions(sysUserRequest));
|
return new SuccessResponseData<>(sysUserService.getUserListByConditions(sysUserRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户列表,通过用户id集合
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @date 2022/9/25 10:27
|
||||||
|
*/
|
||||||
|
@PostResource(name = "获取用户列表,通过用户id集合", path = "/sysUser/getUsersByUserIds")
|
||||||
|
public ResponseData<List<SysUserDTO>> getUsersByUserIds(@RequestBody @Validated(SysUserRequest.getUserList.class) SysUserRequest sysUserRequest) {
|
||||||
|
return new SuccessResponseData<>(sysUserService.getUserInfoList(sysUserRequest.getUserIds()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -894,7 +894,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysUserDTO> getUserInfoList(Set<Long> userIdSet) {
|
public List<SysUserDTO> getUserInfoList(List<Long> userIdSet) {
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(userIdSet)) {
|
if (ObjectUtil.isEmpty(userIdSet)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue