新增用户姓名列表接口
This commit is contained in:
parent
9c90e9bb83
commit
32f29e286c
|
@ -177,6 +177,14 @@ public class SysUserController {
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("nameList")
|
||||||
|
@Operation(summary = "用户姓名列表")
|
||||||
|
public Result<List<String>> nameList(@RequestBody List<Long> idList) {
|
||||||
|
List<String> list = sysUserService.getRealNameList(idList);
|
||||||
|
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("import")
|
@PostMapping("import")
|
||||||
@Operation(summary = "导入用户")
|
@Operation(summary = "导入用户")
|
||||||
@OperateLog(type = OperateTypeEnum.IMPORT)
|
@OperateLog(type = OperateTypeEnum.IMPORT)
|
||||||
|
|
|
@ -32,6 +32,14 @@ public interface SysUserService extends BaseService<SysUserEntity> {
|
||||||
|
|
||||||
void delete(List<Long> idList);
|
void delete(List<Long> idList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户姓名列表
|
||||||
|
*
|
||||||
|
* @param idList 用户ID列表
|
||||||
|
* @return 用户姓名列表
|
||||||
|
*/
|
||||||
|
List<String> getRealNameList(List<Long> idList);
|
||||||
|
|
||||||
SysUserVO getByMobile(String mobile);
|
SysUserVO getByMobile(String mobile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -186,6 +186,15 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public List<String> getRealNameList(List<Long> idList) {
|
||||||
|
if (idList.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return baseMapper.selectBatchIds(idList).stream().map(SysUserEntity::getRealName).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public SysUserVO getByMobile(String mobile) {
|
public SysUserVO getByMobile(String mobile) {
|
||||||
SysUserEntity user = baseMapper.getByMobile(mobile);
|
SysUserEntity user = baseMapper.getByMobile(mobile);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user