Merge branch 'S07' into test

This commit is contained in:
hardstylewyl 2025-04-10 14:44:33 +08:00
commit a5718f9529
2 changed files with 5 additions and 1 deletions

View File

@ -219,6 +219,7 @@ public class TrackDeleteEventHandler : ITransientDependency, ICapSubscribe
x => new OrderEntity
{
Id = x.Id,
LatestTrackStatus = x.LatestTrackStatus,
LatestTrackContent = x.LatestTrackContent,
LatestTrackEnContent = x.LatestTrackEnContent,
LatestTrackPlace = x.LatestTrackPlace,
@ -236,7 +237,7 @@ public class TrackDeleteEventHandler : ITransientDependency, ICapSubscribe
.FirstOrDefault(x => x.OrderId == order.Id);
// 删除全部轨迹导致的重置行为
if (track == default)
if (track == null)
{
if (order.LatestTrackTime == null) continue;
@ -247,6 +248,7 @@ public class TrackDeleteEventHandler : ITransientDependency, ICapSubscribe
{
if (order.LatestTrackContent == track.TrackContent) continue;
// 删除引发的回退更新
order.LatestTrackStatus = track.TrackStatus;
order.LatestTrackContent = track.TrackContent;
order.LatestTrackEnContent = track.TrackEnContent;
order.LatestTrackPlace = track.TrackPlace;
@ -261,6 +263,7 @@ public class TrackDeleteEventHandler : ITransientDependency, ICapSubscribe
await _orderRepository.UpdateRangeAsync(orders,
x => new
{
x.LatestTrackStatus,
x.LatestTrackContent,
x.LatestTrackEnContent,
x.LatestTrackPlace,

View File

@ -213,6 +213,7 @@ public class OrderEntity : IFullAuditedBasicEntitys, IAggregateRoot
public void ResetTrackInfo()
{
IsCompleted = false;
LatestTrackStatus = null;
LatestTrackContent = null;
LatestTrackEnContent = null;
LatestTrackTime = null;