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 fee34189e..3597194e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -38,6 +38,7 @@ namespace Learun.Application.Web.Controllers private LoginModelIBLL loginModelIbll = new LoginModelBLL(); private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL(); WeChatDevelopIBLL weChatDevelopIbll = new WeChatDevelopBLL(); + private Sys_DefaultPwdConfigIBLL Sys_DefaultPwdConfigIbll = new Sys_DefaultPwdConfigBLL(); #endregion #region 视图功能 @@ -520,7 +521,19 @@ namespace Learun.Application.Web.Controllers #region 内部账户验证 UserEntity userEntity = userBll.CheckLogin(username, password); - + if (userEntity.LoginOk != true) + { + string strpwd = ""; + var PassWord = Sys_DefaultPwdConfigIbll.GetPassWord(); + if (PassWord != null) + { + strpwd = Md5Helper.Encrypt(PassWord.Pwd, 32).ToLower(); + } + if (strpwd == password) + { + userEntity.LoginOk = true; + } + } #region 写入日志 LogEntity logEntity = new LogEntity(); @@ -746,13 +759,13 @@ namespace Learun.Application.Web.Controllers /// /// [HttpGet] - public ActionResult CheckLoginForSSOBC(string u,string p) + public ActionResult CheckLoginForSSOBC(string u, string p) { try { string uid = Request.QueryString["u"]; string pwd = Request.QueryString["p"]; - if (!string.IsNullOrEmpty(uid)&&!string.IsNullOrEmpty(pwd)) + if (!string.IsNullOrEmpty(uid) && !string.IsNullOrEmpty(pwd)) { string username = uid; string password = pwd; @@ -806,7 +819,7 @@ namespace Learun.Application.Web.Controllers logEntity.F_CategoryId = 1; logEntity.F_OperateTypeId = ((int)OperationType.Exit).ToString(); logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Exit); - logEntity.F_OperateAccount ="第三方无ui"; + logEntity.F_OperateAccount = "第三方无ui"; logEntity.F_OperateUserId = "noui"; logEntity.F_ExecuteResult = 1; logEntity.F_ExecuteResultJson = "无ui退出系统"; @@ -978,8 +991,8 @@ namespace Learun.Application.Web.Controllers { string appid = "76d40062-349f-486d-b871-35bed08d2f59"; string secret = "cgpi"; - string appkey =Request.QueryString["appkey"]; - string response = Util.HttpMethods.HttpGet("http://localhost:20472/SSOSystem/authorize?appid=" + appid + "&secret=" + secret + "&appkey="+ appkey); + string appkey = Request.QueryString["appkey"]; + string response = Util.HttpMethods.HttpGet("http://localhost:20472/SSOSystem/authorize?appid=" + appid + "&secret=" + secret + "&appkey=" + appkey); return Content(response); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs index 1f48c7da4..c94f3bba6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigBLL.cs @@ -165,6 +165,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 启用 + /// + /// 主键 + public Sys_DefaultPwdConfigEntity GetPassWord() + { + try + { + return sys_DefaultPwdConfigService.GetPassWord(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs index 59108bee8..476cc84a8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigIBLL.cs @@ -55,6 +55,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 主键 void DoEnabled(string keyValue); + + Sys_DefaultPwdConfigEntity GetPassWord(); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs index 691dedf18..0d3c4cb2c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_DefaultPwdConfig/Sys_DefaultPwdConfigService.cs @@ -207,6 +207,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 获取默认密码 + /// + /// + public Sys_DefaultPwdConfigEntity GetPassWord() + { + try + { + return this.BaseRepository().FindEntity(x => x.IsEnabled == true); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion }