|
|
@@ -189,6 +189,7 @@ class MultiStoreCheckoutBatchServiceTest {
|
|
|
verify(orders, org.mockito.Mockito.times(2)).insert(captured.capture());
|
|
|
int sequence = 1;
|
|
|
for (PosOrder order : captured.getAllValues()) {
|
|
|
+ assertEquals(Double.valueOf(sequence == 1 ? 5.0 : 11.2), order.getJvli());
|
|
|
assertTrue(order.getDdId().length() <= 20, "子单号不能超过现有订单关联字段上限");
|
|
|
assertEquals(result.parentOrderNo(), order.getParentDdId());
|
|
|
assertEquals(result.parentOrderNo() + String.format("%03d", sequence++), order.getDdId());
|
|
|
@@ -256,10 +257,12 @@ class MultiStoreCheckoutBatchServiceTest {
|
|
|
List.of(new MultiStoreQuoteRequest.Item(22L, 1, List.of())), null, null)));
|
|
|
when(quotes.loadSnapshot("quote-1", 42L)).thenReturn(new MultiStoreCheckoutQuoteService.QuoteSnapshot(
|
|
|
42L, input, "fingerprint", System.currentTimeMillis() + 60_000));
|
|
|
- var price1 = new MultiStoreQuoteView.StorePrice(1L, new BigDecimal("50"), new BigDecimal("50"),
|
|
|
+ var price1 = new MultiStoreQuoteView.StorePrice(1L, new BigDecimal("5000"),
|
|
|
+ new BigDecimal("50"), new BigDecimal("50"),
|
|
|
new BigDecimal("40"), new BigDecimal("36"), new BigDecimal("36"), BigDecimal.ZERO,
|
|
|
new BigDecimal("86"), List.of("1", "3"));
|
|
|
- var price2 = new MultiStoreQuoteView.StorePrice(2L, new BigDecimal("50"), new BigDecimal("50"),
|
|
|
+ var price2 = new MultiStoreQuoteView.StorePrice(2L, new BigDecimal("11200"),
|
|
|
+ new BigDecimal("50"), new BigDecimal("50"),
|
|
|
new BigDecimal("40"), new BigDecimal("36"), new BigDecimal("36"), BigDecimal.ZERO,
|
|
|
new BigDecimal("86"), List.of("1", "2"));
|
|
|
when(quotes.quote(input, 42L)).thenReturn(new MultiStoreQuoteView("fresh", System.currentTimeMillis() + 60_000,
|