Commit 74bd4602 by guojuxing

修改超级管理员,添加发送短信业务逻辑

parent 37012540
......@@ -211,16 +211,6 @@ public class UserApiServiceImpl implements UserApiService {
if (adminUser == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "超级管理员不存在,操作有误");
}
if (userDTO.getPasswordType() != null && userDTO.getPasswordType().intValue() == 2) {
//如果是自定义密码
if (StringUtils.isBlank(userDTO.getPassword())) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "密码为空,操作有误");
}
userDTO.setPassword(AutoCreatePasswordUtils.encryptPassword(userDTO.getPassword()));
} else if (userDTO.getPasswordType() != null && userDTO.getPasswordType().intValue() == 1) {
//如果是自动生成
userDTO.setPassword(AutoCreatePasswordUtils.autoCreatePassword(8));
}
userDTO.setUserId(adminUser.getUserId());
userService.editUser(userDTO);
return ServiceResponse.success();
......
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