xiazhengtongxue
2026-03-13 a08829b6f60b2320555e9f560464248cc038cada
ÏîÄ¿´úÂë/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天前且URL为特定地址的日志)
                    var result = BaseDal.Db.Deleteable<Sys_Log>()
                        .Where(log => log.EndDate < threeMonthsAgo ||
                                     (log.EndDate < threeDaysAgo && (log.Url == specificUrl || log.Url == anonUrl)))
                        .ExecuteCommand();
                    //// æž„建删除条件:3个月前的日志 æˆ– (3天前且URL为特定地址的日志)
                    //var result = BaseDal.Db.Deleteable<Sys_Log>()
                    //    .Where(log => log.EndDate < threeMonthsAgo ||
                    //                 (log.EndDate < threeDaysAgo && (log.Url == specificUrl || log.Url == anonUrl)))
                    //    .ExecuteCommand();
                    // æ›´æ–°æœ€åŽæ‰§è¡Œæ—¥æœŸä¸ºä»Šå¤©
                    _lastExecutionDate = today;
                }