From 644aa1b0bcbe39ee378b875d03f6dc5c319dbbac Mon Sep 17 00:00:00 2001 From: dao Date: Wed, 27 Nov 2024 17:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../User/UserEntity.cs | 4 +- .../User/UserService.cs | 2 +- .../Controllers/LoginController.cs | 38 +++++++++---------- .../Learun.Util/Learun.Util/Log/LogHelper.cs | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs index 0d1e33017..557917370 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs @@ -238,8 +238,8 @@ namespace Learun.Application.Organization /// /// 修改密码日期 /// - [Column("F_MODIFYPWDDATE")] - public DateTime? F_ModifyPwdDate { get; set; } + //[Column("F_MODIFYPWDDATE")] + //public DateTime? F_ModifyPwdDate { get; set; } /// /// 是否已登录标记 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs index f255420ed..7a79b9463 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs @@ -542,7 +542,7 @@ namespace Learun.Application.Organization userEntity.Modify(keyValue); 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_ModifyPwdDate = DateTime.Now; + //userEntity.F_ModifyPwdDate = DateTime.Now; this.BaseRepository().Update(userEntity); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index 2f7c755f1..b48498348 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -551,7 +551,7 @@ namespace Learun.Application.Web.Controllers [HandlerValidateAntiForgeryToken] public ActionResult CheckLogin(string username, string password, string verifycode, string up) { - + up = "true"; int error = OperatorHelper.Instance.GetCurrentErrorNum(); if (error >= 3) { @@ -621,23 +621,24 @@ namespace Learun.Application.Web.Controllers } //是否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) { @@ -654,7 +655,6 @@ namespace Learun.Application.Web.Controllers } } - return Success(succresult); } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Log/LogHelper.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Log/LogHelper.cs index 6261c1c0d..f9a68a245 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Log/LogHelper.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Log/LogHelper.cs @@ -11,7 +11,7 @@ namespace Learun.Util.Log { #region log //文件路径 - string path = Path.Combine(Directory.GetCurrentDirectory(), "logs"); + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path);