feat: 处理冲突

This commit is contained in:
钟喜旺 2024-07-29 19:03:41 +08:00
parent d00df6745b
commit 67811638a9
3 changed files with 7 additions and 2 deletions

View File

@ -51,6 +51,11 @@ public class ForewarningRuleCacheEntry
/// 区域 /// 区域
/// </summary> /// </summary>
public AreaCacheEntry? Area { get; set; } public AreaCacheEntry? Area { get; set; }
/// <summary>
/// 区域
/// </summary>
public List<AreaCacheEntry>? Areas { get; set; }
/// <summary> /// <summary>
/// 是否中转 /// 是否中转

View File

@ -76,7 +76,7 @@ public class ForewarningCacheService: IForewarningCacheService, ISingletonDepend
CargoType = item.CargoType, CargoType = item.CargoType,
Months = string.IsNullOrEmpty(item.Months)?new List<int>():item.Months.Split('/').Select(int.Parse).ToList(), Months = string.IsNullOrEmpty(item.Months)?new List<int>():item.Months.Split('/').Select(int.Parse).ToList(),
IsTransit = item.IsTransit, IsTransit = item.IsTransit,
AreaId = areaList, Areas = areaList,
ProductCode = item.ProductCode, ProductCode = item.ProductCode,
LeavePort = item.LeavePort LeavePort = item.LeavePort
}; };

View File

@ -57,7 +57,7 @@ public class KpiAreaService : ApplicationService
{ {
await _ruleAreaRepository.DeleteArea(id); await _ruleAreaRepository.DeleteArea(id);
await _forewarningCacheService.ClearRedis(); 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, "删除成功"); return new UnifyResultDto(true, "删除成功");
} }