admin/src/Oms.Application/Integrations/SmallBagTrack/SmallBagTrackUpsertRequest.cs
zzh a4d7c89e44 fix: resolve track ApiCode from product and channel publish snapshots
Read SupplierCode from rules publish snapshots before falling back to live itfx metadata so UpsertSmallBag gets apiCode at order create time.
2026-07-23 10:49:19 +08:00

50 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace Oms.Application.Integrations.SmallBagTrack;
/// <summary>
/// POST /OrderV2/UpsertSmallBag 请求体。
/// </summary>
public class SmallBagTrackUpsertRequest
{
public string Client { get; set; } = string.Empty;
public string OrderNo { get; set; } = string.Empty;
public string TrackNo { get; set; } = string.Empty;
public string OtherNo { get; set; } = string.Empty;
public string Channel { get; set; } = string.Empty;
public string Product { get; set; } = string.Empty;
/// <summary>
/// 轨迹拉取配置 code(对应轨迹 ServiceProviderCode;优先发布快照 SupplierCode)。
/// </summary>
public string ApiCode { get; set; } = string.Empty;
public SmallBagTrackConsigneeRequest Consignee { get; set; } = new();
/// <summary>
/// 转发到轨迹网关的 Authorization(异步入队前从当前 HTTP 请求捕获)。
/// </summary>
public string? Authorization { get; set; }
/// <summary>
/// UpsertSmallBag 成功后是否追加创单默认轨迹(A0101/SZ)。
/// </summary>
public bool AppendInitialTrackOnSuccess { get; set; }
}
public class SmallBagTrackConsigneeRequest
{
public string CountryCode { get; set; } = string.Empty;
public string Province { get; set; } = string.Empty;
public string Postcode { get; set; } = string.Empty;
public string City { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
}