|
@@ -55,7 +55,7 @@ public class UserConfigServiceImpl implements UserConfigService {
|
|
Assert.hasText(nickname, "The nickname is null.");
|
|
Assert.hasText(nickname, "The nickname is null.");
|
|
String password = params.get("password");
|
|
String password = params.get("password");
|
|
Assert.hasText(password, "The password is null.");
|
|
Assert.hasText(password, "The password is null.");
|
|
- String mail = params.get("mail");
|
|
|
|
|
|
+ String email = params.get("email");
|
|
String phone = params.get("phone");
|
|
String phone = params.get("phone");
|
|
|
|
|
|
// 验证当前登录用户合法身份(必须是管理员操作)
|
|
// 验证当前登录用户合法身份(必须是管理员操作)
|
|
@@ -65,7 +65,7 @@ public class UserConfigServiceImpl implements UserConfigService {
|
|
// 新用户合法性(用户不能重复)
|
|
// 新用户合法性(用户不能重复)
|
|
Assert.isNull(userConfig.getUserInfo(username), "用户已存在,请换个账号");
|
|
Assert.isNull(userConfig.getUserInfo(username), "用户已存在,请换个账号");
|
|
// 注册新用户
|
|
// 注册新用户
|
|
- userConfig.getUserInfoList().add(new UserInfo(username, nickname, SHA1Util.b64_sha1(password), UserRoleEnum.USER.getCode(), mail, phone));
|
|
|
|
|
|
+ userConfig.getUserInfoList().add(new UserInfo(username, nickname, SHA1Util.b64_sha1(password), UserRoleEnum.USER.getCode(), email, phone));
|
|
|
|
|
|
logService.log(LogType.UserLog.INSERT, String.format("[%s]添加[%s]账号成功", currentUser.getUsername(), username));
|
|
logService.log(LogType.UserLog.INSERT, String.format("[%s]添加[%s]账号成功", currentUser.getUsername(), username));
|
|
return profileComponent.editConfigModel(userConfig);
|
|
return profileComponent.editConfigModel(userConfig);
|
|
@@ -78,7 +78,7 @@ public class UserConfigServiceImpl implements UserConfigService {
|
|
String nickname = params.get("nickname");
|
|
String nickname = params.get("nickname");
|
|
Assert.hasText(nickname, "The nickname is null.");
|
|
Assert.hasText(nickname, "The nickname is null.");
|
|
String newPwd = params.get("newPwd");
|
|
String newPwd = params.get("newPwd");
|
|
- String mail = params.get("mail");
|
|
|
|
|
|
+ String email = params.get("email");
|
|
String phone = params.get("phone");
|
|
String phone = params.get("phone");
|
|
|
|
|
|
// 验证当前登录用户合法身份(管理员或本人操作)
|
|
// 验证当前登录用户合法身份(管理员或本人操作)
|
|
@@ -94,7 +94,7 @@ public class UserConfigServiceImpl implements UserConfigService {
|
|
|
|
|
|
// 用户昵称
|
|
// 用户昵称
|
|
updateUser.setNickname(nickname);
|
|
updateUser.setNickname(nickname);
|
|
- updateUser.setMail(mail);
|
|
|
|
|
|
+ updateUser.setEmail(email);
|
|
updateUser.setPhone(phone);
|
|
updateUser.setPhone(phone);
|
|
// 修改密码
|
|
// 修改密码
|
|
if (StringUtil.isNotBlank(newPwd)) {
|
|
if (StringUtil.isNotBlank(newPwd)) {
|