@@ -955,7 +955,7 @@ namespace Learun.Application.Organization | |||||
{ | { | ||||
cache.Remove(cacheKeyId + item, CacheId.user); | cache.Remove(cacheKeyId + item, CacheId.user); | ||||
} | } | ||||
string password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["pwdprex"] + ConfigurationManager.AppSettings["defaultpwd"], 32).ToLower(); | |||||
string password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["pwdprex"] + ConfigurationManager.AppSettings["pwdsuff"], 32).ToLower(); | |||||
userService.RevisePasswordBatch(keyValue, password); | userService.RevisePasswordBatch(keyValue, password); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -549,7 +549,7 @@ namespace Learun.Application.Organization | |||||
{ | { | ||||
userEntity.Modify(userModel.F_UserId); | userEntity.Modify(userModel.F_UserId); | ||||
userEntity.F_Secretkey = Md5Helper.Encrypt(CommonHelper.CreateNo(), 16).ToLower(); | userEntity.F_Secretkey = Md5Helper.Encrypt(CommonHelper.CreateNo(), 16).ToLower(); | ||||
if (!string.IsNullOrEmpty(userModel.F_IdentityCardNo)) | |||||
if (!string.IsNullOrEmpty(userModel.F_IdentityCardNo) && userModel.F_IdentityCardNo.Length >= 6) | |||||
{ | { | ||||
//密码规则:前缀+身份证后6位 | //密码规则:前缀+身份证后6位 | ||||
password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["pwdprex"] + userModel.F_IdentityCardNo.Substring(userModel.F_IdentityCardNo.Length - 6, 6), 32).ToLower(); | password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["pwdprex"] + userModel.F_IdentityCardNo.Substring(userModel.F_IdentityCardNo.Length - 6, 6), 32).ToLower(); | ||||
@@ -631,21 +631,21 @@ namespace Learun.Application.Web.Controllers | |||||
} | } | ||||
} | } | ||||
//是否初始密码 | //是否初始密码 | ||||
if (string.IsNullOrEmpty(userEntity.F_IdentityCardNo)) | |||||
if (!string.IsNullOrEmpty(userEntity.F_IdentityCardNo) && userEntity.F_IdentityCardNo.Length >= 6) | |||||
{ | { | ||||
if (password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + "123456", 32) || password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + "2020", 32) || password == Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32)) | |||||
if (password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + userEntity.F_IdentityCardNo.Substring(userEntity.F_IdentityCardNo.Length - 6, 6), 32) || password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + "2020", 32) || password == Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32)) | |||||
{ | { | ||||
succresult.pwd = true; | succresult.pwd = true; | ||||
} | } | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
if (password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + userEntity.F_IdentityCardNo.Substring(userEntity.F_IdentityCardNo.Length - 6, 6), 32) || password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + "2020", 32) || password == Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32)) | |||||
if (password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + Config.GetValue("pwdsuff"), 32) || password == Md5Helper.Encrypt(Config.GetValue("pwdprex") + "2020", 32) || password == Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32)) | |||||
{ | { | ||||
succresult.pwd = true; | succresult.pwd = true; | ||||
} | } | ||||
} | } | ||||
return Success(succresult); | return Success(succresult); | ||||
} | } | ||||
@@ -101,6 +101,7 @@ | |||||
<add key="defaultpwd" value="123456" /> | <add key="defaultpwd" value="123456" /> | ||||
<add key="defaultpwdeight" value="abc123**" /> | <add key="defaultpwdeight" value="abc123**" /> | ||||
<add key="pwdprex" value="Xcmzyz@" /> | <add key="pwdprex" value="Xcmzyz@" /> | ||||
<add key="pwdsuff" value="123456" /> | |||||
<!-- ================== 统一身份认证公钥密钥 ================== --> | <!-- ================== 统一身份认证公钥密钥 ================== --> | ||||
<add key="SSOPublicSecret" value="bjquanjiang" /> | <add key="SSOPublicSecret" value="bjquanjiang" /> | ||||
<add key="SSOUserSecret" value="123456789" /> | <add key="SSOUserSecret" value="123456789" /> | ||||
@@ -406,7 +406,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi | |||||
userbase.F_Account = tEntity.EmpNo; | userbase.F_Account = tEntity.EmpNo; | ||||
userbase.F_RealName = tEntity.EmpName; | userbase.F_RealName = tEntity.EmpName; | ||||
userbase.F_EnCode = tEntity.EmpNo; | userbase.F_EnCode = tEntity.EmpNo; | ||||
userbase.F_Password = string.IsNullOrEmpty(tEntity.IdentityCardNo) ? Md5Helper.Encrypt(Config.GetValue("pwdprex") + Config.GetValue("defaultpwd"), 32).ToLower() : Md5Helper.Encrypt(Config.GetValue("pwdprex") + tEntity.IdentityCardNo.Substring(tEntity.IdentityCardNo.Length - 6, 6), 32).ToLower(); | |||||
userbase.F_Password = (!string.IsNullOrEmpty(tEntity.IdentityCardNo) && tEntity.IdentityCardNo.Length >= 6) ? Md5Helper.Encrypt(Config.GetValue("pwdprex") + tEntity.IdentityCardNo.Substring(tEntity.IdentityCardNo.Length - 6, 6), 32).ToLower() : Md5Helper.Encrypt(Config.GetValue("pwdprex") + Config.GetValue("pwdsuff"), 32).ToLower(); | |||||
userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url; | userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url; | ||||
userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1; | userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1; | ||||
userbase.F_DeleteMark = 0; | userbase.F_DeleteMark = 0; | ||||
@@ -777,7 +777,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
userbase.F_Account = tEntity.StuNo; | userbase.F_Account = tEntity.StuNo; | ||||
userbase.F_RealName = tEntity.StuName; | userbase.F_RealName = tEntity.StuName; | ||||
userbase.F_EnCode = tEntity.StuNo; | userbase.F_EnCode = tEntity.StuNo; | ||||
userbase.F_Password = string.IsNullOrEmpty(tEntity.IdentityCardNo) ? Md5Helper.Encrypt(Config.GetValue("pwdprex") + Config.GetValue("defaultpwd"), 32).ToLower() : Md5Helper.Encrypt(Config.GetValue("pwdprex") + tEntity.IdentityCardNo.Substring(tEntity.IdentityCardNo.Length - 6, 6), 32).ToLower(); | |||||
userbase.F_Password = (!string.IsNullOrEmpty(tEntity.IdentityCardNo) && tEntity.IdentityCardNo.Length >= 6) ? Md5Helper.Encrypt(Config.GetValue("pwdprex") + tEntity.IdentityCardNo.Substring(tEntity.IdentityCardNo.Length - 6, 6), 32).ToLower() : Md5Helper.Encrypt(Config.GetValue("pwdprex") + Config.GetValue("pwdsuff"), 32).ToLower(); | |||||
userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url; | userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url; | ||||
userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1; | userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1; | ||||
userbase.F_DeleteMark = 0; | userbase.F_DeleteMark = 0; | ||||