This commit is contained in:
2026-09-15 11:54:14 +08:00
parent 3fb9909dd3
commit c1f01e1e87
56 changed files with 973 additions and 231 deletions
@@ -14,6 +14,7 @@ public final class EventTypes {
"FirstLegContainerShippingNodeRecorded";
public static final String OVERSEAS_CONTAINER_UNLOADED = "OverseasContainerUnloaded";
public static final String OVERSEAS_INBOUND_ORDER_DETAINED_CHANGED = "OverseasInboundOrderDetainedChanged";
public static final String OVERSEAS_DELIVERY_COMPLETED = "OverseasDeliveryCompleted";
public static final String BUSINESS_FEE_SOURCE_CHANGED = "BusinessFeeSourceChanged";
public static final String WALLET_COMMAND_REQUESTED = "WalletCommandRequested";
public static final String WALLET_COMMAND_COMPLETED = "WalletCommandCompleted";
@@ -0,0 +1,19 @@
package com.baiyue.common.event;
import java.time.Instant;
/** 海外派送单按目的 FBA 仓签收后,回传对应国内入仓单和订单的完成事实。 */
public record OverseasDeliveryCompletedV1(
String deliveryOrderId,
String deliveryNo,
String lastlegOrderId,
String lastlegOrderNo,
String sourceInboundId,
String inboundCode,
String sourceOrderId,
String sourceOrderNo,
String rootOrderId,
String fbaWarehouseCode,
Instant completedAt
) {
}
@@ -0,0 +1,26 @@
package com.baiyue.common.event;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.junit.jupiter.api.Test;
import java.time.Instant;
import static org.assertj.core.api.Assertions.assertThat;
class OverseasDeliveryCompletedV1Test {
private final ObjectMapper mapper = new ObjectMapper().registerModule(new JavaTimeModule());
@Test
void roundTripsStableSourceIdentifiers() throws Exception {
var value = new OverseasDeliveryCompletedV1("31", "DL-31", "41", "LM-41", "51",
"NYEXX2609080022", "61", "FL-61", "61", "ACY2",
Instant.parse("2026-09-15T08:00:00Z"));
var restored = mapper.readValue(mapper.writeValueAsBytes(value), OverseasDeliveryCompletedV1.class);
assertThat(restored).isEqualTo(value);
assertThat(restored.sourceInboundId()).isEqualTo("51");
assertThat(restored.sourceOrderId()).isEqualTo("61");
}
}