【7.2.5】【user】更新获取用户列表的接口

pull/37/head
fengshuonan 2022-09-25 10:29:21 +08:00
parent a9df61789a
commit 5638037e8d
4 changed files with 21 additions and 3 deletions

View File

@ -140,7 +140,7 @@ public interface UserServiceApi {
* @author fengshuonan
* @date 2022/9/25 10:14
*/
List<SysUserDTO> getUserInfoList(Set<Long> userIdSet);
List<SysUserDTO> getUserInfoList(List<Long> userIdSet);
/**
* ID()

View File

@ -177,7 +177,7 @@ public class SysUserRequest extends BaseRequest {
/**
* id()
*/
@NotEmpty(message = "用户id集合不能为空", groups = batchDelete.class)
@NotEmpty(message = "用户id集合不能为空", groups = {batchDelete.class, getUserList.class})
@ChineseDescription("用户id集合(用在批量删除)")
private List<Long> userIds;
@ -271,6 +271,12 @@ public class SysUserRequest extends BaseRequest {
public @interface reg {
}
/**
* id
*/
public @interface getUserList {
}
}

View File

@ -329,4 +329,16 @@ public class SysUserController {
public ResponseData<List<SimpleDict>> getUserListByConditions(SysUserRequest 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()));
}
}

View File

@ -894,7 +894,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
@Override
public List<SysUserDTO> getUserInfoList(Set<Long> userIdSet) {
public List<SysUserDTO> getUserInfoList(List<Long> userIdSet) {
if (ObjectUtil.isEmpty(userIdSet)) {
return new ArrayList<>();