feat: 完成门店管理剩余接口并补齐文档注释
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 46s

This commit is contained in:
2026-02-17 14:54:35 +08:00
parent 3a94348cca
commit 1b185af718
45 changed files with 13333 additions and 91 deletions

View File

@@ -19,6 +19,8 @@ public sealed class CreateStoreDeliveryZoneCommandValidator : AbstractValidator<
RuleFor(x => x.MinimumOrderAmount).GreaterThanOrEqualTo(0).When(x => x.MinimumOrderAmount.HasValue);
RuleFor(x => x.DeliveryFee).GreaterThanOrEqualTo(0).When(x => x.DeliveryFee.HasValue);
RuleFor(x => x.EstimatedMinutes).GreaterThan(0).When(x => x.EstimatedMinutes.HasValue);
RuleFor(x => x.Color).MaximumLength(32);
RuleFor(x => x.Priority).GreaterThanOrEqualTo(0);
RuleFor(x => x.SortOrder).GreaterThanOrEqualTo(0);
}
}

View File

@@ -20,6 +20,8 @@ public sealed class UpdateStoreDeliveryZoneCommandValidator : AbstractValidator<
RuleFor(x => x.MinimumOrderAmount).GreaterThanOrEqualTo(0).When(x => x.MinimumOrderAmount.HasValue);
RuleFor(x => x.DeliveryFee).GreaterThanOrEqualTo(0).When(x => x.DeliveryFee.HasValue);
RuleFor(x => x.EstimatedMinutes).GreaterThan(0).When(x => x.EstimatedMinutes.HasValue);
RuleFor(x => x.Color).MaximumLength(32);
RuleFor(x => x.Priority).GreaterThanOrEqualTo(0);
RuleFor(x => x.SortOrder).GreaterThanOrEqualTo(0);
}
}

View File

@@ -32,6 +32,14 @@ public sealed class UpdateStoreFeeCommandValidator : AbstractValidator<UpdateSto
.Must(fee => !fee.HasValue || fee.Value >= 0)
.WithMessage("固定打包费不能为负数");
RuleFor(x => x.CutleryFeeAmount)
.GreaterThanOrEqualTo(0)
.LessThanOrEqualTo(99.99m);
RuleFor(x => x.RushFeeAmount)
.GreaterThanOrEqualTo(0)
.LessThanOrEqualTo(99.99m);
RuleFor(x => x)
.Custom((command, context) =>
{

View File

@@ -17,5 +17,6 @@ public sealed class UpsertStorePickupSettingCommandValidator : AbstractValidator
RuleFor(x => x.AllowDaysAhead).GreaterThanOrEqualTo(0);
RuleFor(x => x.DefaultCutoffMinutes).GreaterThanOrEqualTo(0);
RuleFor(x => x.MaxQuantityPerOrder).GreaterThan(0).When(x => x.MaxQuantityPerOrder.HasValue);
RuleFor(x => x.FineRuleJson).MaximumLength(20000);
}
}