From d0c1ee8bc57aa184f33ea3e06dd0ce20fdf52439 Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Wed, 7 May 2025 09:51:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E6=8E=A8=E9=80=81=E9=85=8D=E7=BD=AE=E5=90=8E?= =?UTF-8?q?=E5=BC=95=E5=8F=91=E7=9A=84=E9=A2=84=E8=AD=A6=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=A4=84=E4=BA=8E=E4=BA=8B=E5=8A=A1=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E8=BF=9B=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Broadcasting/BroadcastingService.cs | 2 +- .../Services/TrackPush/TrackPushService.cs | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/SJZY.Track.Application/Services/Broadcasting/BroadcastingService.cs b/src/SJZY.Track.Application/Services/Broadcasting/BroadcastingService.cs index 0b772567..7af7e83b 100644 --- a/src/SJZY.Track.Application/Services/Broadcasting/BroadcastingService.cs +++ b/src/SJZY.Track.Application/Services/Broadcasting/BroadcastingService.cs @@ -90,7 +90,7 @@ public class BroadcastingService : IBroadcastingService OperationMan = log.OperationMan, PushTime = log.PushTime, OptionType = log.OptionType, - IsManualPush = log.IsManualPush, //操作人不为系统用户,则认为是仍推送 + IsManualPush = log.IsManualPush, //操作人不为系统用户,则认为是人推送 PushContent = log.PushContent, OrderNo = log.OrderNo, TrackStatus = log.TrackStatus, diff --git a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs index 8bb19fca..646da5e2 100644 --- a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs +++ b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs @@ -270,10 +270,11 @@ public class TrackPushService : ApplicationService, ISingletonDependency await _trackPushCacheService.SetPushContentConfigsAsync(pushConfig.SubSystemId, pushConfig.CustomId); } - // 引发预警计算 - await WarningCalc_PushContentConfigChanged(pushConfig, oldContentConfig, postContentConfig); ts.Complete(); + // 引发预警计算 + WarningCalc_PushContentConfigChanged(pushConfig, oldContentConfig, postContentConfig); + return true; } @@ -285,7 +286,7 @@ public class TrackPushService : ApplicationService, ISingletonDependency [HttpPost("SortContent")] public async Task SortContentAsync([FromBody] SortTrackPushContentInput input) { - List ids = input.SortInfo.Select(x => int.Parse(x.Key)).ToList(); + var ids = input.SortInfo.Select(x => int.Parse(x.Key)).ToList(); var trackPushContentEntities = await _trackPushConfigRepository.GetContentListAsync(x => ids.Contains(x.Id)); @@ -297,9 +298,13 @@ public class TrackPushService : ApplicationService, ISingletonDependency await _trackPushConfigRepository.UpdateContentRangeAsync(trackPushContentEntities); - var pushConfig = - await _trackPushConfigRepository.GetFirstAsync(x => - x.Id == trackPushContentEntities[0].TrackPushConfigId); + var pushConfig = await _trackPushConfigRepository.GetFirstAsync( + x => x.Id == trackPushContentEntities[0].TrackPushConfigId, + y => new + { + y.SubSystemId, + y.CustomId + }); if (pushConfig != null) { await _trackPushCacheService.SetPushContentConfigsAsync(pushConfig.SubSystemId, pushConfig.CustomId); @@ -312,7 +317,7 @@ public class TrackPushService : ApplicationService, ISingletonDependency } - private async Task WarningCalc_PushContentConfigChanged(TrackPushConfigEntity? pushConfig, TrackPushContentConfigEntity? oldContentConfig, TrackPushContentConfigEntity? postContentConfig) + private void WarningCalc_PushContentConfigChanged(TrackPushConfigEntity? pushConfig, TrackPushContentConfigEntity? oldContentConfig, TrackPushContentConfigEntity? postContentConfig) { // 推送配置主体不存在? if (pushConfig == null) return;