From 67811638a9bc2b911e02fcc8ea94c971d4e4b047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E5=96=9C=E6=97=BA?= Date: Mon, 29 Jul 2024 19:03:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=84=E7=90=86=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/Forewarning/ForewarningRuleCacheEntry.cs | 5 +++++ .../Services/ForewarningServices/ForewarningCacheService.cs | 2 +- .../Services/ForewarningServices/KpiAreaService.cs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/ForewarningRuleCacheEntry.cs b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/ForewarningRuleCacheEntry.cs index 71d402b6..fd9e30e2 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/ForewarningRuleCacheEntry.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/ForewarningRuleCacheEntry.cs @@ -51,6 +51,11 @@ public class ForewarningRuleCacheEntry /// 区域 /// public AreaCacheEntry? Area { get; set; } + + /// + /// 区域 + /// + public List? Areas { get; set; } /// /// 是否中转 diff --git a/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningCacheService.cs b/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningCacheService.cs index 317e6c3a..a79684d6 100644 --- a/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningCacheService.cs +++ b/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningCacheService.cs @@ -76,7 +76,7 @@ public class ForewarningCacheService: IForewarningCacheService, ISingletonDepend CargoType = item.CargoType, Months = string.IsNullOrEmpty(item.Months)?new List():item.Months.Split('/').Select(int.Parse).ToList(), IsTransit = item.IsTransit, - AreaId = areaList, + Areas = areaList, ProductCode = item.ProductCode, LeavePort = item.LeavePort }; diff --git a/src/SJZY.Track.Application/Services/ForewarningServices/KpiAreaService.cs b/src/SJZY.Track.Application/Services/ForewarningServices/KpiAreaService.cs index a0057a41..3b693a1c 100644 --- a/src/SJZY.Track.Application/Services/ForewarningServices/KpiAreaService.cs +++ b/src/SJZY.Track.Application/Services/ForewarningServices/KpiAreaService.cs @@ -57,7 +57,7 @@ public class KpiAreaService : ApplicationService { await _ruleAreaRepository.DeleteArea(id); await _forewarningCacheService.ClearRedis(); - await RedisHelper.Client.PublishAsync(GlobalConst.PublishNotifyChannelKey, "clear locl cache"); + await RedisHelper.Client.PublishAsync(GlobalConst.PublishNotifyChannelKey, "clear local cache"); return new UnifyResultDto(true, "删除成功"); }