feat: Add tiered packaging fee support for stores

Introduces tiered packaging fee configuration for stores by adding OrderPackagingFeeMode and PackagingFeeTiers fields to StoreFee. Updates DTOs, validators, handlers, and mapping logic to support both fixed and tiered packaging fee modes. Adds StoreFeeTierHelper for tier normalization and serialization, and includes a database migration to persist the new fields.
This commit is contained in:
2026-01-26 09:26:49 +08:00
parent 923856e286
commit 725f89ae24
18 changed files with 604 additions and 53 deletions

View File

@@ -36,11 +36,21 @@ public sealed record StoreFeeDto
/// </summary>
public PackagingFeeMode PackagingFeeMode { get; init; }
/// <summary>
/// 订单打包费规则。
/// </summary>
public OrderPackagingFeeMode OrderPackagingFeeMode { get; init; }
/// <summary>
/// 固定打包费。
/// </summary>
public decimal FixedPackagingFee { get; init; }
/// <summary>
/// 阶梯打包费配置。
/// </summary>
public IReadOnlyList<StoreFeeTierDto> PackagingFeeTiers { get; init; } = [];
/// <summary>
/// 免配送费门槛。
/// </summary>