规则发布写入黑名单、偏远、计重规则与进位明细;查价/下单优先读快照。修正 unit/total/continue 算价及续单价相邻档位总价基数。 Co-authored-by: Cursor <cursoragent@cursor.com>
147 lines
4.0 KiB
C#
147 lines
4.0 KiB
C#
using Oms.Application.Dtos.Channels;
|
||
|
||
namespace Oms.Application.Dtos.Orders;
|
||
|
||
/// <summary>
|
||
/// 销售产品价格发布快照(与渠道发布 JSON 同构)。
|
||
/// </summary>
|
||
public class SalesProductPricePublishSnapshotDto
|
||
{
|
||
/// <summary>
|
||
/// 销售产品主键。
|
||
/// </summary>
|
||
public int SalesProductId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 价格分区 ID(发布时固化,查价/计费优先用快照内分区规则)。
|
||
/// </summary>
|
||
public int? PriceAreaId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 价格分区名称。
|
||
/// </summary>
|
||
public string? PriceAreaName { get; set; }
|
||
|
||
/// <summary>
|
||
/// 价格分区明细(国家/邮编等),发布时从 t_kpi_area_info 固化。
|
||
/// </summary>
|
||
public List<KpiAreaInfoOutput> PriceAreaInfos { get; set; } = [];
|
||
|
||
/// <summary>
|
||
/// 价格项列表。
|
||
/// </summary>
|
||
public List<SalesProductPriceListOutput> Prices { get; set; } = [];
|
||
}
|
||
|
||
/// <summary>
|
||
/// 销售产品规则发布快照(与渠道发布 JSON 同构)。
|
||
/// </summary>
|
||
public class SalesProductRulesPublishSnapshotDto
|
||
{
|
||
/// <summary>
|
||
/// 产品基础信息。
|
||
/// </summary>
|
||
public SalesProductSaveInput? Product { get; set; }
|
||
|
||
/// <summary>
|
||
/// 分配的服务商列表。
|
||
/// </summary>
|
||
public List<SalesProductAllocationProviderOutput> Providers { get; set; } = [];
|
||
|
||
/// <summary>
|
||
/// 黑名单分区 ID(发布时固化)。
|
||
/// </summary>
|
||
public int? BlacklistAreaId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 黑名单分区名称。
|
||
/// </summary>
|
||
public string? BlacklistAreaName { get; set; }
|
||
|
||
/// <summary>
|
||
/// 黑名单分区明细,发布时从 t_kpi_area_info 固化。
|
||
/// </summary>
|
||
public List<KpiAreaInfoOutput> BlacklistAreaInfos { get; set; } = [];
|
||
|
||
/// <summary>
|
||
/// 偏远分区 ID(发布时固化)。
|
||
/// </summary>
|
||
public int? RemoteAreaId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 偏远分区名称。
|
||
/// </summary>
|
||
public string? RemoteAreaName { get; set; }
|
||
|
||
/// <summary>
|
||
/// 偏远分区明细,发布时从 t_kpi_area_info 固化。
|
||
/// </summary>
|
||
public List<KpiAreaInfoOutput> RemoteAreaInfos { get; set; } = [];
|
||
|
||
/// <summary>
|
||
/// 计重规则 ID(发布时固化)。
|
||
/// </summary>
|
||
public int? WeightRuleId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 计重规则名称。
|
||
/// </summary>
|
||
public string? WeightRuleName { get; set; }
|
||
|
||
/// <summary>
|
||
/// 计重规则明细,发布时从 t_weight_rule_info 固化。
|
||
/// </summary>
|
||
public List<WeightRuleInfoOutput> WeightRuleInfos { get; set; } = [];
|
||
|
||
/// <summary>
|
||
/// 计重进位 ID(发布时固化)。
|
||
/// </summary>
|
||
public int? WeightRoundingId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 计重进位名称。
|
||
/// </summary>
|
||
public string? WeightRoundingName { get; set; }
|
||
|
||
/// <summary>
|
||
/// 计重进位区间,发布时从 t_weight_rounding_info 固化。
|
||
/// </summary>
|
||
public List<WeightRoundingInfoOutput> WeightRoundingInfos { get; set; } = [];
|
||
}
|
||
|
||
/// <summary>
|
||
/// 绑定到订单的快照版本信息。
|
||
/// </summary>
|
||
public class ProductSnapshotBinding
|
||
{
|
||
/// <summary>
|
||
/// 规则快照版本号。
|
||
/// </summary>
|
||
public string RulesVersion { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 价格快照版本号。
|
||
/// </summary>
|
||
public string PriceVersion { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 规则快照生效时间。
|
||
/// </summary>
|
||
public DateTime RulesEffectiveTime { get; set; }
|
||
|
||
/// <summary>
|
||
/// 价格快照生效时间。
|
||
/// </summary>
|
||
public DateTime PriceEffectiveTime { get; set; }
|
||
|
||
/// <summary>
|
||
/// 规则快照内容。
|
||
/// </summary>
|
||
public SalesProductRulesPublishSnapshotDto Rules { get; set; } = new();
|
||
|
||
/// <summary>
|
||
/// 价格快照内容。
|
||
/// </summary>
|
||
public SalesProductPricePublishSnapshotDto Price { get; set; } = new();
|
||
}
|