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;