Commit d560e2ac authored by “yiyousong”'s avatar “yiyousong”
parents 4d79d995 9d7aa81c
...@@ -445,6 +445,10 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity ...@@ -445,6 +445,10 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
throw new AppException("帐号错误!"); throw new AppException("帐号错误!");
} }
try { try {
if(StringUtils.isEmpty(sysUser.getSaltKey())) {
String saltKey = SecurityCode.getSecurityCode(6,SecurityCode.SecurityCodeLevel.Medium,false);
sysUser.setSaltKey(saltKey);
}
sysUser.setLoginPwd(SecurityUtil.md5DoubleEncoding(newPwd + sysUser.getSaltKey())); sysUser.setLoginPwd(SecurityUtil.md5DoubleEncoding(newPwd + sysUser.getSaltKey()));
} catch (Exception e) { } catch (Exception e) {
throw new AppException("密码转换异常!", e); throw new AppException("密码转换异常!", e);
...@@ -522,4 +526,5 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity ...@@ -522,4 +526,5 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
return successMsg.toString(); return successMsg.toString();
} }
} }
\ No newline at end of file
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