From bd40cc9e7dd6352915568ce49baa4accd1d9645b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 18 四月 2026 14:23:35 +0800
Subject: [PATCH] feat: 添加机器人任务处理逻辑和消息去重功能

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
index 046380e..7c82c8c 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
@@ -46,8 +46,16 @@
 
         public Task StartAsync(CancellationToken cancellationToken)
         {
+            const string cacheKey = $"{RedisPrefix.Code}";
+
+            _cache.RemoveByPrefix($"{cacheKey}");
+
+
+
             const string cacheKeyPrefix = $"{RedisPrefix.Code}:{RedisName.API}:";
             int warmedCount = 0;
+
+
 
             foreach ((string configKey, string routePath) in ApiRouteMappings)
             {
@@ -55,7 +63,7 @@
                 warmedCount++;
             }
 
-            _logger.LogInformation("锟斤拷API路锟缴伙拷锟斤拷预锟斤拷锟斤拷伞锟斤拷锟斤拷锟�={Count}", warmedCount);
+            _logger.LogInformation("API璺敱缂撳瓨棰勭儹瀹屾垚锛屽叡鍔犺浇={Count}涓矾鐢辨槧灏�", warmedCount);
             return Task.CompletedTask;
         }
 

--
Gitblit v1.9.3