fix: strip audit fields from channel price publish snapshots
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ecfaad3824
commit
e2dca20966
@ -116,7 +116,7 @@ public class ServiceChannelPricePublishSnapshotDto
|
|||||||
{
|
{
|
||||||
public int ServiceChannelId { get; set; }
|
public int ServiceChannelId { get; set; }
|
||||||
|
|
||||||
public List<ServiceChannelPriceListOutput> Prices { get; set; } = [];
|
public List<ServiceChannelPriceSnapshotItemDto> Prices { get; set; } = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -90,3 +90,31 @@ public class SalesProductPriceSnapshotItemDto
|
|||||||
|
|
||||||
public List<ChannelPriceDetailOutput> Details { get; set; } = [];
|
public List<ChannelPriceDetailOutput> Details { get; set; } = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 服务渠道卖价项快照(不含创建/更新时间)。
|
||||||
|
/// </summary>
|
||||||
|
public class ServiceChannelPriceSnapshotItemDto
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int ServiceChannelId { get; set; }
|
||||||
|
|
||||||
|
public int SerialNumber { get; set; }
|
||||||
|
|
||||||
|
public byte Status { get; set; }
|
||||||
|
|
||||||
|
public string PriceName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string CostItem { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string CostUnit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Currency { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string? ChargingCondition { get; set; }
|
||||||
|
|
||||||
|
public List<ChannelPriceFactorOutput> Factors { get; set; } = [];
|
||||||
|
|
||||||
|
public List<ChannelPriceDetailOutput> Details { get; set; } = [];
|
||||||
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Oms.Application.Dtos.Channels;
|
using Oms.Application.Dtos.Channels;
|
||||||
|
using Oms.Application.Dtos.Orders;
|
||||||
using Oms.Application.Dtos.Shared;
|
using Oms.Application.Dtos.Shared;
|
||||||
using Oms.Application.Shared;
|
using Oms.Application.Shared;
|
||||||
using Oms.Domain.ChannelsAggregate.Entities;
|
using Oms.Domain.ChannelsAggregate.Entities;
|
||||||
@ -479,7 +480,7 @@ public partial class ServiceChannelService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ServiceChannelPriceSaveInput MapPriceSaveInput(ServiceChannelPriceListOutput output)
|
private static ServiceChannelPriceSaveInput MapPriceSaveInput(ServiceChannelPriceSnapshotItemDto output)
|
||||||
{
|
{
|
||||||
return new ServiceChannelPriceSaveInput
|
return new ServiceChannelPriceSaveInput
|
||||||
{
|
{
|
||||||
@ -525,7 +526,7 @@ public partial class ServiceChannelService
|
|||||||
{
|
{
|
||||||
public int ServiceChannelId { get; set; }
|
public int ServiceChannelId { get; set; }
|
||||||
|
|
||||||
public List<ServiceChannelPriceListOutput> Prices { get; set; } = [];
|
public List<ServiceChannelPriceSnapshotItemDto> Prices { get; set; } = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
private sealed class ServiceChannelRulesPublishSnapshot
|
private sealed class ServiceChannelRulesPublishSnapshot
|
||||||
|
|||||||
@ -807,7 +807,7 @@ public partial class OrderService
|
|||||||
{
|
{
|
||||||
return new ChannelPriceBinding
|
return new ChannelPriceBinding
|
||||||
{
|
{
|
||||||
Prices = snapshot.Prices,
|
Prices = snapshot.Prices.Select(PublishSnapshotSlimmer.ToChannelPriceListOutput).ToList(),
|
||||||
PriceVersion = priceRecord.Version,
|
PriceVersion = priceRecord.Version,
|
||||||
PriceEffectiveTime = priceRecord.PublishTime
|
PriceEffectiveTime = priceRecord.PublishTime
|
||||||
};
|
};
|
||||||
|
|||||||
@ -24,7 +24,23 @@ public static class PublishSnapshotSlimmer
|
|||||||
Details = price.Details
|
Details = price.Details
|
||||||
};
|
};
|
||||||
|
|
||||||
public static ServiceChannelPriceListOutput SlimChannelPrice(ServiceChannelPriceListOutput price) =>
|
public static ServiceChannelPriceSnapshotItemDto SlimChannelPrice(ServiceChannelPriceListOutput price) =>
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Id = price.Id,
|
||||||
|
ServiceChannelId = price.ServiceChannelId,
|
||||||
|
SerialNumber = price.SerialNumber,
|
||||||
|
Status = price.Status,
|
||||||
|
PriceName = price.PriceName,
|
||||||
|
CostItem = price.CostItem,
|
||||||
|
CostUnit = price.CostUnit,
|
||||||
|
Currency = price.Currency,
|
||||||
|
ChargingCondition = price.ChargingCondition,
|
||||||
|
Factors = price.Factors,
|
||||||
|
Details = price.Details
|
||||||
|
};
|
||||||
|
|
||||||
|
public static ServiceChannelPriceListOutput ToChannelPriceListOutput(ServiceChannelPriceSnapshotItemDto price) =>
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
Id = price.Id,
|
Id = price.Id,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user