|
|
@@ -273,8 +273,8 @@ public class UserManagerController extends BaseController {
|
|
|
return error("请填写手机号");
|
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/update/password/{userUU}/{spaceUU}", method = RequestMethod.POST)
|
|
|
- public ModelMap updatePassword(@PathVariable Long userUU, @PathVariable Long spaceUU, String password) {
|
|
|
+ @RequestMapping(value = "/update/{type}/{userUU}/{spaceUU}", method = RequestMethod.POST)
|
|
|
+ public ModelMap updatePassword(@PathVariable String type, @PathVariable Long userUU, @PathVariable Long spaceUU, String password, String data) {
|
|
|
// 获取企业密钥
|
|
|
Userspace userspace = userspaceService.findOne(spaceUU);
|
|
|
|
|
|
@@ -282,7 +282,19 @@ public class UserManagerController extends BaseController {
|
|
|
checkRequest(userspace.getAccessSecret());
|
|
|
|
|
|
// 修改密码
|
|
|
- userService.updatePassword(userUU, password);
|
|
|
+ switch (type) {
|
|
|
+ case "password":
|
|
|
+ userService.updatePassword(userUU, password);
|
|
|
+ break;
|
|
|
+ case "mobile":
|
|
|
+ userService.updateMobile(userUU, data);
|
|
|
+ break;
|
|
|
+ case "email":
|
|
|
+ userService.updateEmail(userUU, data);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return error("404", "请求错误");
|
|
|
+ }
|
|
|
|
|
|
return success();
|
|
|
}
|