This commit is contained in:
2026-09-10 17:11:33 +08:00
parent 1ee32b7a6f
commit 2e6a18c58e
54 changed files with 2094 additions and 167 deletions
@@ -50,6 +50,13 @@ class RelabelContractTest {
"source_warehouse_code", "source_warehouse_name", "idx_ll_relabel_item_source_position" }) {
assertTrue(deployment.contains(field), () -> "deployment SQL must include " + field);
}
for (String field : new String[] { "delivery_method", "print_shipping_label", "shipping_label_file_id",
"shipping_label_file_name", "shipping_label_file_url", "fulfillment_status", "outbound_order_no",
"customer_confirmation_key", "customer_confirmed_at" }) {
assertTrue(baseline.contains(field), () -> "baseline SQL must include " + field);
assertTrue(migration.contains(field), () -> "migration SQL must include " + field);
assertTrue(deployment.contains(field), () -> "deployment SQL must include " + field);
}
}
@Test
@@ -63,6 +70,19 @@ class RelabelContractTest {
assertTrue(openApi.contains("platform:overseas-warehouse:relabel-order:list"));
assertTrue(openApi.contains("platform:overseas-warehouse:relabel-order:create"));
assertTrue(openApi.contains("platform:overseas-warehouse:relabel-order:status"));
for (String path : new String[] {
"/api/merchant/v1/last-leg/relabel-applications/inventory-candidates:",
"/api/merchant/v1/last-leg/relabel-applications:",
"/api/merchant/v1/last-leg/relabel-applications/{relabelNo}:",
"/api/merchant/v1/last-leg/relabel-applications/{relabelNo}/shipping-label:",
"/api/merchant/v1/last-leg/relabel-applications/{relabelNo}/shipping-label/{fileId}/download:",
"/api/merchant/v1/last-leg/relabel-applications/{relabelNo}/completion-photos/{fileId}/download:",
"/api/merchant/v1/last-leg/relabel-applications/{relabelNo}/confirm-completion:" }) {
assertTrue(openApi.contains(path), () -> "merchant relabel path missing: " + path);
}
assertTrue(openApi.contains("RelabelMerchantPageResponse"));
assertTrue(openApi.contains("RelabelCustomerConfirm"));
assertTrue(openApi.contains("merchant:warehouse:relabel"));
String relabelPaths = openApi.substring(openApi.indexOf("/api/platform/v1/last-leg/relabel-applications:"),
openApi.indexOf("components:"));
assertTrue(relabelPaths.contains("name: customerId, in: query, required: true"));