|
@@ -93,7 +93,7 @@ public class UserController extends BaseController {
|
|
|
@ApiImplicitParams({ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String"),
|
|
|
@ApiImplicitParam(name = "authCode", value = "验证码", required = true, dataType = "String"),
|
|
|
@ApiImplicitParam(name = "newPassword", value = "新密码", required = true, dataType = "String")})
|
|
|
- public Object updatePassword(String mobile,String authCode,String password,String newPassword) {
|
|
|
+ public Object updatePassword(String mobile,String authCode,String newPassword) {
|
|
|
if(StringUtils.isEmpty(mobile) || StringUtils.isEmpty(authCode) || StringUtils.isEmpty(newPassword)){
|
|
|
return failed("参数校验异常");
|
|
|
}
|
|
@@ -102,7 +102,7 @@ public class UserController extends BaseController {
|
|
|
return failed("用户不存在");
|
|
|
}
|
|
|
if(smsCodeService.verifyValidCode(mobile, authCode)){
|
|
|
- sysUserService.updatePassword(mobile,newPassword);
|
|
|
+ sysUserService.updatePassword(mobile,new BCryptPasswordEncoder().encode(newPassword));
|
|
|
return succeed();
|
|
|
}else {
|
|
|
return failed("验证码错误");
|