Commit b92d5ab1 authored by 王向伟's avatar 王向伟

编辑时密码不能修改

parent ca144c25
......@@ -29,7 +29,6 @@ public class UserModelVo {
/**
* 密码
*/
@NotEmpty(message = "用户密码不能为空")
private String password;
/**
......
......@@ -271,7 +271,7 @@ public class UserServiceImpl implements UserService {
return Result.buildFail("不存在相应的用户,不能更新");
}
User exist = userRepository.getOne(id);
String password = exist.getPassword();
String existUsername = exist.getUsername();
String username = userModelVo.getUsername();
if (!existUsername.equals(username)) {
......@@ -291,7 +291,7 @@ public class UserServiceImpl implements UserService {
BeanUtils.copyProperties(userModelVo, exist);
exist.setPassword(password);
Long channelId = exist.getChannelId();
//渠道检查
......@@ -304,7 +304,7 @@ public class UserServiceImpl implements UserService {
exist.setChannelName(configuration.getChannelName());
}
exist.setPassword(MD5Tools.md5(userModelVo.getPassword()));
//exist.setPassword(MD5Tools.md5(userModelVo.getPassword()));
exist.setRoles(Collections.singletonList(role));
exist.setUpdateTime(new Date());
userRepository.save(exist);
......
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