优化
This commit is contained in:
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestHeader;
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/** Internal read contract for Firstleg co-load group aggregation. */
|
/** Internal read contract for Firstleg co-load group aggregation. */
|
||||||
@FeignClient(name = "firstleg-service", contextId = "orderFirstlegColoadGroupClient",
|
@FeignClient(name = "firstleg-service", contextId = "orderFirstlegColoadGroupClient",
|
||||||
@@ -18,6 +19,9 @@ public interface FirstlegColoadGroupClient {
|
|||||||
|
|
||||||
record BatchQueryRequest(List<Long> orderIds) {}
|
record BatchQueryRequest(List<Long> orderIds) {}
|
||||||
record OrderGroupInfo(Long orderId, GroupSnapshot group) {}
|
record OrderGroupInfo(Long orderId, GroupSnapshot group) {}
|
||||||
record GroupSnapshot(String status, List<Member> members) {}
|
record GroupSnapshot(Long groupId, String groupNo, String status, Long warehouseId,
|
||||||
record Member(Long orderId) {}
|
String channelCode, Long lockedPlanId, Integer version,
|
||||||
|
List<Member> members, Integer fullPackageCount,
|
||||||
|
LocalDateTime createdAt, LocalDateTime updatedAt) {}
|
||||||
|
record Member(Long tenantId, Long orderId, Long inboundId, Integer fullPackageCount) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,8 +262,11 @@ class UnifiedOrderQueryServiceTest {
|
|||||||
otherCustomerMember.setId(78L);
|
otherCustomerMember.setId(78L);
|
||||||
otherCustomerMember.setTenantId(20002L);
|
otherCustomerMember.setTenantId(20002L);
|
||||||
otherCustomerMember.setInboundCode("RK-OTHER-CUSTOMER");
|
otherCustomerMember.setInboundCode("RK-OTHER-CUSTOMER");
|
||||||
var group = new FirstlegColoadGroupClient.GroupSnapshot("ACTIVE", List.of(
|
var group = new FirstlegColoadGroupClient.GroupSnapshot(
|
||||||
new FirstlegColoadGroupClient.Member(77L), new FirstlegColoadGroupClient.Member(78L)));
|
700L, "CLG-700", "ACTIVE", 11L, "MATSON", null, 0,
|
||||||
|
List.of(new FirstlegColoadGroupClient.Member(10001L, 77L, 88L, 10),
|
||||||
|
new FirstlegColoadGroupClient.Member(20002L, 78L, 89L, 20)),
|
||||||
|
30, null, null);
|
||||||
when(orders.unifiedPage(eq(10001L), eq(query), eq(List.of(OrderStatus.SUBMITTED))))
|
when(orders.unifiedPage(eq(10001L), eq(query), eq(List.of(OrderStatus.SUBMITTED))))
|
||||||
.thenReturn(new PageResult<>(List.of(current), 1, 20, 1, 1));
|
.thenReturn(new PageResult<>(List.of(current), 1, 20, 1, 1));
|
||||||
when(coloadGroups.batchQuery(eq("internal-token"), any())).thenReturn(ApiResponse.success(
|
when(coloadGroups.batchQuery(eq("internal-token"), any())).thenReturn(ApiResponse.success(
|
||||||
|
|||||||
Reference in New Issue
Block a user