fix: restore overseas list queries and identifiers

This commit is contained in:
2026-09-07 12:30:17 +08:00
parent 30e883fe0c
commit fcf1771967
19 changed files with 93 additions and 33 deletions
@@ -28,6 +28,8 @@ class RelabelContractTest {
void schemasDefineRelabelApplicationItemsAndHistoryContracts() throws Exception {
String baseline = Files.readString(Path.of("src/main/resources/db/lastleg.sql"), StandardCharsets.UTF_8).toLowerCase();
String migration = Files.readString(Path.of("..", "scripts", "db", "incremental.sql"), StandardCharsets.UTF_8).toLowerCase();
String deployment = Files.readString(Path.of("..", "deploy", "sql", "海外区域统一增量-MySQL8.sql"),
StandardCharsets.UTF_8).toLowerCase();
for (String schema : new String[] { baseline, migration }) {
assertTrue(schema.contains("ll_relabel_application"));
assertTrue(schema.contains("ll_relabel_item"));
@@ -36,6 +38,13 @@ class RelabelContractTest {
assertTrue(schema.contains("idempotency_key"));
assertTrue(schema.contains("request_hash"));
}
for (String schema : new String[] { baseline, migration, deployment }) {
assertTrue(schema.contains("ll_relabel_item"));
assertTrue(schema.contains("remark"));
assertTrue(schema.contains("carton_mark"));
assertTrue(schema.contains("fba_carton_mark"));
assertTrue(schema.contains("destination_warehouse_id"));
}
}
@Test
@@ -32,6 +32,7 @@ import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
@@ -99,9 +100,9 @@ class RelabelApplicationServiceTest {
assertEquals("RELABEL:PENDING_PROCESSING", tailOrder.getValue().getSubOrderStatus());
assertEquals("CUSTOMER", tailOrder.getValue().getSourceRegion());
assertTrue(tailOrder.getValue().getOrderNo().matches("RL-WH-\\d{8}-\\d{6}"));
assertEquals(tailOrder.getValue().getInboundCode() + ":WH-1", tailOrder.getValue().getSourceInboundId());
assertEquals(tailOrder.getValue().getInboundCode(), application.getValue().getRelabelNo());
assertTrue(tailOrder.getValue().getInboundCode().startsWith("RL-"));
assertNull(tailOrder.getValue().getInboundCode());
assertEquals(application.getValue().getRelabelNo() + ":WH-1", tailOrder.getValue().getSourceInboundId());
assertEquals(tailOrder.getValue().getRelabelOrderNo(), application.getValue().getRelabelNo());
assertEquals(10, tailOrder.getValue().getPackageCount());
assertEquals(6, application.getValue().getNotifiedPackageCount());
assertEquals("SKU-A", relabelItem.getValue().getSkuCode());