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

编辑时密码不能修改

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