|
@@ -313,8 +313,11 @@ public class UserServiceImpl implements UserService {
|
|
|
return sysUserMapper.updateByPrimaryKey(user);
|
|
|
}
|
|
|
|
|
|
- public Integer updatePassword(String userID, String newPassword, String updateBy) {
|
|
|
+ public Integer updatePassword(String userID, String newPassword, String updateBy) throws Exception {
|
|
|
SysUser user = sysUserMapper.selectByPrimaryKey(userID);
|
|
|
+ if(newPassword.equals(user.getPassword())){
|
|
|
+ throw new Exception("新密码与旧密码不能相同!");
|
|
|
+ }
|
|
|
user.setPassword(newPassword);
|
|
|
user.setUpdateBy(updateBy);
|
|
|
user.setUpdateTime(new Date());
|