Browse Source

优化修改

同煤学院(新)
dao 2 months ago
parent
commit
644aa1b0bc
4 changed files with 23 additions and 23 deletions
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  3. +19
    -19
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Log/LogHelper.cs

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs View File

@@ -238,8 +238,8 @@ namespace Learun.Application.Organization
/// <summary> /// <summary>
/// 修改密码日期 /// 修改密码日期
/// </summary> /// </summary>
[Column("F_MODIFYPWDDATE")]
public DateTime? F_ModifyPwdDate { get; set; }
//[Column("F_MODIFYPWDDATE")]
//public DateTime? F_ModifyPwdDate { get; set; }
/// <summary> /// <summary>
/// 是否已登录标记 /// 是否已登录标记
/// </summary> /// </summary>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs View File

@@ -542,7 +542,7 @@ namespace Learun.Application.Organization
userEntity.Modify(keyValue); userEntity.Modify(keyValue);
userEntity.F_Secretkey = Md5Helper.Encrypt(CommonHelper.CreateNo(), 16).ToLower(); userEntity.F_Secretkey = Md5Helper.Encrypt(CommonHelper.CreateNo(), 16).ToLower();
userEntity.F_Password = Md5Helper.Encrypt(DESEncrypt.Encrypt(password, userEntity.F_Secretkey).ToLower(), 32).ToLower(); userEntity.F_Password = Md5Helper.Encrypt(DESEncrypt.Encrypt(password, userEntity.F_Secretkey).ToLower(), 32).ToLower();
userEntity.F_ModifyPwdDate = DateTime.Now;
//userEntity.F_ModifyPwdDate = DateTime.Now;
this.BaseRepository().Update(userEntity); this.BaseRepository().Update(userEntity);
} }
catch (Exception ex) catch (Exception ex)


+ 19
- 19
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs View File

@@ -551,7 +551,7 @@ namespace Learun.Application.Web.Controllers
[HandlerValidateAntiForgeryToken] [HandlerValidateAntiForgeryToken]
public ActionResult CheckLogin(string username, string password, string verifycode, string up) public ActionResult CheckLogin(string username, string password, string verifycode, string up)
{ {
up = "true";
int error = OperatorHelper.Instance.GetCurrentErrorNum(); int error = OperatorHelper.Instance.GetCurrentErrorNum();
if (error >= 3) if (error >= 3)
{ {
@@ -621,23 +621,24 @@ namespace Learun.Application.Web.Controllers
} }
//是否30天未修改密码验证 //是否30天未修改密码验证
//获取开关显示配置中“30天未修改密码登录后提示修改”项的配置 //获取开关显示配置中“30天未修改密码登录后提示修改”项的配置
if (teachSwitchIBLL.FindFirst("modifypwdtip"))
{
if (userEntity.F_ModifyPwdDate.HasValue)
{
if ((DateTime.Now - userEntity.F_ModifyPwdDate.Value).Days > 30)
{
succresult.pwdtip = true;
}
}
else
{
if (userEntity.F_CreateDate.HasValue && (DateTime.Now - userEntity.F_CreateDate.Value).Days > 30)
{
succresult.pwdtip = true;
}
}
}
//if (teachSwitchIBLL.FindFirst("modifypwdtip"))
//{
// if (userEntity.F_ModifyPwdDate.HasValue)
// {
// if ((DateTime.Now - userEntity.F_ModifyPwdDate.Value).Days > 30)
// {
// succresult.pwdtip = true;
// }
// }
// else
// {
// if (userEntity.F_CreateDate.HasValue && (DateTime.Now - userEntity.F_CreateDate.Value).Days > 30)
// {
// succresult.pwdtip = true;
// }
// }
//}
//是否初始密码 //是否初始密码
if (!string.IsNullOrEmpty(userEntity.F_IdentityCardNo) && userEntity.F_IdentityCardNo.Length >= 6) if (!string.IsNullOrEmpty(userEntity.F_IdentityCardNo) && userEntity.F_IdentityCardNo.Length >= 6)
{ {
@@ -654,7 +655,6 @@ namespace Learun.Application.Web.Controllers
} }
} }



return Success(succresult); return Success(succresult);
} }
#endregion #endregion


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Log/LogHelper.cs View File

@@ -11,7 +11,7 @@ namespace Learun.Util.Log
{ {
#region log #region log
//文件路径 //文件路径
string path = Path.Combine(Directory.GetCurrentDirectory(), "logs");
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
if (!Directory.Exists(path)) if (!Directory.Exists(path))
{ {
Directory.CreateDirectory(path); Directory.CreateDirectory(path);


Loading…
Cancel
Save