From 74098641f68787dd3b0140c7a5a4ebcb8dc3fd64 Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Wed, 7 Aug 2024 17:25:58 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=91=E6=81=AF=E6=97=B6=E9=97=B4=E6=94=B9?=
=?UTF-8?q?=E5=88=B0=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.API/appsettings.Event_IRC.json | 6 +++++-
IRaCIS.Core.API/appsettings.Prod_IRC.json | 4 +++-
IRaCIS.Core.API/appsettings.Test_IRC.json | 5 ++++-
IRaCIS.Core.API/appsettings.US_Prod_IRC.json | 5 ++++-
IRaCIS.Core.API/appsettings.US_Test_IRC.json | 5 ++++-
IRaCIS.Core.API/appsettings.US_Uat_IRC.json | 3 +++
IRaCIS.Core.API/appsettings.Uat_IRC.json | 5 ++++-
.../Service/Management/UserService.cs | 2 +-
IRaCIS.Core.Domain/_Config/_AppSettings.cs | 11 +++++++++++
IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 1 -
10 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/IRaCIS.Core.API/appsettings.Event_IRC.json b/IRaCIS.Core.API/appsettings.Event_IRC.json
index 216571d78..fa5674cb6 100644
--- a/IRaCIS.Core.API/appsettings.Event_IRC.json
+++ b/IRaCIS.Core.API/appsettings.Event_IRC.json
@@ -47,7 +47,11 @@
"ContinuousReadingTimeMin": 120,
- "ReadingRestTimeMin": 10
+ "ReadingRestTimeMin": 10,
+
+ "IsNeedChangePassWord": true,
+
+ "ChangePassWordDays": 90
},
"SystemEmailSendConfig": {
"Port": 465,
diff --git a/IRaCIS.Core.API/appsettings.Prod_IRC.json b/IRaCIS.Core.API/appsettings.Prod_IRC.json
index 7b2b1d376..c3dd1e8a2 100644
--- a/IRaCIS.Core.API/appsettings.Prod_IRC.json
+++ b/IRaCIS.Core.API/appsettings.Prod_IRC.json
@@ -49,8 +49,10 @@
"ContinuousReadingTimeMin": 120,
- "ReadingRestTimeMin": 10
+ "ReadingRestTimeMin": 10,
+ "IsNeedChangePassWord": true,
+ "ChangePassWordDays": 90
},
"SystemEmailSendConfig": {
diff --git a/IRaCIS.Core.API/appsettings.Test_IRC.json b/IRaCIS.Core.API/appsettings.Test_IRC.json
index c397ac52d..377d97bc2 100644
--- a/IRaCIS.Core.API/appsettings.Test_IRC.json
+++ b/IRaCIS.Core.API/appsettings.Test_IRC.json
@@ -65,7 +65,10 @@
"ContinuousReadingTimeMin": 120,
- "ReadingRestTimeMin": 10
+ "ReadingRestTimeMin": 10,
+ "IsNeedChangePassWord": true,
+
+ "ChangePassWordDays": 90
},
"SystemEmailSendConfig": {
diff --git a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json
index 0c7ed8158..b2d650a67 100644
--- a/IRaCIS.Core.API/appsettings.US_Prod_IRC.json
+++ b/IRaCIS.Core.API/appsettings.US_Prod_IRC.json
@@ -63,7 +63,10 @@
"ContinuousReadingTimeMin": 120,
- "ReadingRestTimeMin": 10
+ "ReadingRestTimeMin": 10,
+ "IsNeedChangePassWord": true,
+
+ "ChangePassWordDays": 90
},
"SystemEmailSendConfig": {
diff --git a/IRaCIS.Core.API/appsettings.US_Test_IRC.json b/IRaCIS.Core.API/appsettings.US_Test_IRC.json
index 67d4b1fe7..a0eed7266 100644
--- a/IRaCIS.Core.API/appsettings.US_Test_IRC.json
+++ b/IRaCIS.Core.API/appsettings.US_Test_IRC.json
@@ -69,7 +69,10 @@
"ContinuousReadingTimeMin": 120,
- "ReadingRestTimeMin": 10
+ "ReadingRestTimeMin": 10,
+ "IsNeedChangePassWord": true,
+
+ "ChangePassWordDays": 90
},
"SystemEmailSendConfig": {
diff --git a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json
index 8697adda1..f16b2410d 100644
--- a/IRaCIS.Core.API/appsettings.US_Uat_IRC.json
+++ b/IRaCIS.Core.API/appsettings.US_Uat_IRC.json
@@ -62,6 +62,9 @@
"ContinuousReadingTimeMin": 120,
"ReadingRestTimeMin": 10,
+ "IsNeedChangePassWord": true,
+
+ "ChangePassWordDays": 90,
"OpenLoginMFA": true
},
diff --git a/IRaCIS.Core.API/appsettings.Uat_IRC.json b/IRaCIS.Core.API/appsettings.Uat_IRC.json
index 923001d1a..a107b1342 100644
--- a/IRaCIS.Core.API/appsettings.Uat_IRC.json
+++ b/IRaCIS.Core.API/appsettings.Uat_IRC.json
@@ -56,7 +56,10 @@
"ContinuousReadingTimeMin": 120,
- "ReadingRestTimeMin": 10
+ "ReadingRestTimeMin": 10,
+ "IsNeedChangePassWord": true,
+
+ "ChangePassWordDays": 90
},
"SystemEmailSendConfig": {
diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs
index a719dbab3..759578cd3 100644
--- a/IRaCIS.Core.Application/Service/Management/UserService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserService.cs
@@ -794,7 +794,7 @@ namespace IRaCIS.Application.Services
}
//超过90天没修改密码
- if (loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-90) > loginUser.LastChangePassWordTime.Value)
+ if (_verifyConfig.CurrentValue.IsNeedChangePassWord&& loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value)
{
loginUser.LoginState = 1;
}
diff --git a/IRaCIS.Core.Domain/_Config/_AppSettings.cs b/IRaCIS.Core.Domain/_Config/_AppSettings.cs
index b4c890257..d4284b22e 100644
--- a/IRaCIS.Core.Domain/_Config/_AppSettings.cs
+++ b/IRaCIS.Core.Domain/_Config/_AppSettings.cs
@@ -36,6 +36,17 @@ namespace IRaCIS.Core.Domain.Share
///
public int ReadingRestTimeMin { get; set; }
+
+ ///
+ /// 是否需要修改密码
+ ///
+ public bool IsNeedChangePassWord { get; set; }
+
+ ///
+ /// 修改密码的天数
+ ///
+ public int ChangePassWordDays { get; set; }
+
}
public class SystemEmailSendConfig
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index ec1e86542..86937cd19 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -2870,7 +2870,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{
Unit = (ValueUnit)int.Parse(x.Code),
- UnitName = x.Value.ToString(),
}).ToList();
//获取表格问题名称 组合成数组