Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-api-cloud
This commit is contained in:
commit
f782ce66b4
1 file changed
+16
+16
@@ -440,4 +440,20 @@ public class SysUserController {
|
||||
return R.ok(user);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户名获取用户列表
|
||||
*
|
||||
* @param username 用户名
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/checkUsername")
|
||||
@Schema(description = "根据用户名效验当前用户是否存在")
|
||||
public R<Boolean> checkUsername(@RequestParam("username") String username) {
|
||||
List<SysUser> list = userService.list(Wrappers.<SysUser>lambdaQuery().like(SysUser::getUsername, username));
|
||||
if (!CollUtil.isEmpty(list)) {
|
||||
return R.ok(false);
|
||||
}
|
||||
return R.ok(true);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user