密码校验
This commit is contained in:
@@ -93,7 +93,10 @@ public class UserInfoController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "UserInfo", value = "待添加的UserInfo实例", paramType = "body", dataType = "UserInfo", required = true)})
|
||||
public Result<Object> add(@RequestBody UserInfo userInfo) {
|
||||
userInfo.getPassword();
|
||||
String s = StringUtil.passwordCheck(userInfo.getPassword());
|
||||
if (s == null){
|
||||
return ResultGenerator.genFailResult("密码不合规");
|
||||
}
|
||||
userInfoNewService.register(userInfo);
|
||||
return ResultGenerator.genSuccessResult();
|
||||
}
|
||||
@@ -139,6 +142,10 @@ public class UserInfoController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "UserInfo", value = "更新的UserInfo实例", paramType = "body", dataType = "UserInfo", required = true),})
|
||||
public Result<Object> forgetPassword(@RequestBody UserInfo userInfo) {
|
||||
String s = StringUtil.passwordCheck(userInfo.getPassword());
|
||||
if (s == null){
|
||||
return ResultGenerator.genFailResult("密码不合规");
|
||||
}
|
||||
userInfoNewService.forgetPwd(userInfo);
|
||||
return ResultGenerator.genSuccessResult();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user