Commit f32a497d authored by 技术部-任文超's avatar 技术部-任文超

重置密码时支持指定自定义密码

parent 79c3acf0
......@@ -1361,11 +1361,11 @@ public class InnerController implements IBaseController {
*/
@ApiOperation(notes = "重置密码接口 - 供内部系统免密调用", value = "重置密码", nickname = "resetPassword")
@RequestMapping(path = "/user/password/reset", method = RequestMethod.POST)
public JsonResult resetPassword(@RequestParam("phone") String phone) {
public JsonResult resetPassword(@RequestParam("phone") String phone, @RequestParam(required = false) String password) {
if (ValidationUtil.validatePhoneNo(phone)) {
try {
// 默认重置的密码是123456
String password = "123456";
password = StringUtils.isBlank(password) ? "123456" : password;
boolean result = userService.resetPassword(phone, password);
log.info("重置用户密码,phoneNo:[{}],password:[{}],result:[{}]", phone, password, result);
if (result) {
......@@ -1427,7 +1427,7 @@ public class InnerController implements IBaseController {
log.error("密码重置失败,key错误!@!,phone:[{}]", phone);
return JsonResult.buildErrorStateResult("用户密码重置失败.", HttpStatus.SC_UNAUTHORIZED);
}
return resetPassword(phone);
return resetPassword(phone, null);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment