From a08829b6f60b2320555e9f560464248cc038cada Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 13 三月 2026 13:56:16 +0800
Subject: [PATCH] fix: 修复日志问题
---
项目代码/WCSServices/WIDESEAWCS_SystemServices/Sys_LogService.cs | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_SystemServices/Sys_LogService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_SystemServices/Sys_LogService.cs"
index ce0fd89..9ffc2aa 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_SystemServices/Sys_LogService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_SystemServices/Sys_LogService.cs"
@@ -197,19 +197,20 @@
}
try
{
- // 璁$畻3涓湀鍓嶇殑鏃ユ湡
- var threeMonthsAgo = DateTime.Now.AddMonths(-3);
- // 璁$畻3澶╁墠鐨勬棩鏈�
- var threeDaysAgo = DateTime.Now.AddDays(-3);
- // 鐗瑰畾URL
- var specificUrl = "http://11.2.30.141:10870/interfaces/api/amr/robotQuery";
- var anonUrl = "http://11.2.30.111/anon/api/kuka/drivestatus";
+ var result = BaseDal.Db.Deleteable<Sys_Log>().ExecuteCommand();
+ //// 璁$畻3涓湀鍓嶇殑鏃ユ湡
+ //var threeMonthsAgo = DateTime.Now.AddMonths(-3);
+ //// 璁$畻3澶╁墠鐨勬棩鏈�
+ //var threeDaysAgo = DateTime.Now.AddDays(-3);
+ //// 鐗瑰畾URL
+ //var specificUrl = "http://11.2.30.141:10870/interfaces/api/amr/robotQuery";
+ //var anonUrl = "http://11.2.30.111/anon/api/kuka/drivestatus";
- // 鏋勫缓鍒犻櫎鏉′欢锛�3涓湀鍓嶇殑鏃ュ織 鎴� (3澶╁墠涓擴RL涓虹壒瀹氬湴鍧�鐨勬棩蹇�)
- var result = BaseDal.Db.Deleteable<Sys_Log>()
- .Where(log => log.EndDate < threeMonthsAgo ||
- (log.EndDate < threeDaysAgo && (log.Url == specificUrl || log.Url == anonUrl)))
- .ExecuteCommand();
+ //// 鏋勫缓鍒犻櫎鏉′欢锛�3涓湀鍓嶇殑鏃ュ織 鎴� (3澶╁墠涓擴RL涓虹壒瀹氬湴鍧�鐨勬棩蹇�)
+ //var result = BaseDal.Db.Deleteable<Sys_Log>()
+ // .Where(log => log.EndDate < threeMonthsAgo ||
+ // (log.EndDate < threeDaysAgo && (log.Url == specificUrl || log.Url == anonUrl)))
+ // .ExecuteCommand();
// 鏇存柊鏈�鍚庢墽琛屾棩鏈熶负浠婂ぉ
_lastExecutionDate = today;
}
--
Gitblit v1.9.3