|
|
|
@ -81,15 +81,17 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
|
|
|
|
|
BatchCreateDistributionOrdersRequestDTO request = buildBatchCreateDistributionOrdersRequestDTO(param);
|
|
|
|
|
BatchCreateDistributionOrdersResponseDTO response = dsApiService.batchCreateDistributionOrders(param.getShopId(), request);
|
|
|
|
|
|
|
|
|
|
// String res = "{\"result\":\"success\",\"successCount\":1,\"failCount\":0,\"successList\":[{\"result\":\"success\",\"data\":{\"success\":true,\"totalSuccessAmount\":1399,\"orderId\":\"3630260954504828754\",\"postFee\":0,\"mutilOrders\":null},\"createAlibabaOrderLogId\":1420,\"platformOrderIds\":[\"6917543139367389081\"],\"isEncryptOrder\":\"true\",\"isSupportEncryptOrder\":1,\"isUseManualConsignee\":0,\"flow\":\"fenxiao\",\"includeSplitJxhy\":false,\"sourceOrderIds\":[\"3630260954504828754\"],\"payRet\":null,\"platformOrderId\":\"6917543139367389081\",\"relatePurchaseOrderInfos\":[{\"platformOrderId\":\"6917543139367389081\",\"purchasePlatform\":\"1688DS\",\"purchaseOrderSn\":\"3630260954504828754\",\"purchaseOrderBuyer\":\"\\u6843\\u72f8\\u706c\\u5c0f\\u7231\",\"purchaseOrderSeller\":\"\\u4e49\\u4e4c\\u73cd\\u4eab\\u8d38\\u6613\",\"purchaseOrderPayment\":\"13.99\",\"purchaseOrderFullname\":\"\\u7535*\",\"purchaseOrderMobile\":\"1********00\",\"purchaseOrderFullAddress\":\"\\u5317\\u4eac \\u5317\\u4eac\\u5e02 \\u6d77\\u6dc0\\u533a \\u6d77\\u6dc0\\u8857\\u9053 \\u4e92\\u8054*******\",\"purchaseOrderStartTime\":\"2023-11-14 14:29:33\",\"platformPushStatus\":\"wait\",\"purchaseOrderLogisticsName\":\"\",\"purchaseOrderWaybillCode\":\"\",\"purchaseOrderStatus\":\"wait_pay\",\"purchaseOrderFlow\":\"fenxiao\",\"alibabaOrderStatus\":\"waitbuyerpay\",\"isUseManualConsignee\":0,\"isDsEncryptOrder\":0,\"isSupportEncryptOrder\":0,\"logisticsIsAccept\":false,\"items\":[{\"skuId\":\"3659175955997568\",\"wareId\":\"3649883085652281308\",\"purchaseNum\":\"1\",\"purchasePrice\":\"13.99\",\"sourceItemId\":\"686872273204\",\"subItemId\":\"3630260954504828754\"}],\"mergePurchasePlatformOrderIds\":null,\"purchaseOrderUpdateTime\":\"2023-11-14 14:29:33\",\"purchaseOrderPayTime\":null}]}],\"errorList\":null,\"lockSourceItems\":[{\"createPurchaseOrderLockSkuId\":\"2077\",\"createPurchaseOrderLockId\":\"20001608\",\"sourceItemId\":\"686872273204\",\"sourceSkuId\":\"4897420288982\",\"createPurchaseOrderLogId\":\"1477\",\"sourceOrderId\":\"3630260954504828754\",\"sourceNum\":null,\"reqId\":null,\"status\":\"lock\",\"gmtCreate\":\"2023-11-14 14:29:32\",\"gmtModified\":\"2023-11-14 14:29:33\",\"platformOrderId\":\"6917543139367389081\",\"platformItemId\":\"3649883085652281308\",\"platformSkuId\":\"3659175955997568\"}]}";
|
|
|
|
|
// BatchCreateDistributionOrdersResponseDTO response = JSON.parseObject(res, BatchCreateDistributionOrdersResponseDTO.class);
|
|
|
|
|
// String res = "{\"result\":\"success\",\"successCount\":1,\"failCount\":0,\"successList\":[{\"result\":\"success\",\"data\":{\"success\":true,\"totalSuccessAmount\":598,\"orderId\":\"3641170788609141341\",\"postFee\":0,\"mutilOrders\":null},\"createAlibabaOrderLogId\":1496,\"platformOrderIds\":[\"6923971910449173607\"],\"isEncryptOrder\":\"true\",\"isSupportEncryptOrder\":1,\"isUseManualConsignee\":0,\"flow\":\"fenxiao\",\"includeSplitJxhy\":false,\"sourceOrderIds\":[\"3641170788609141341\"],\"payRet\":null,\"platformOrderId\":\"6923971910449173607\",\"relatePurchaseOrderInfos\":[{\"platformOrderId\":\"6923971910449173607\",\"purchasePlatform\":\"1688DS\",\"purchaseOrderSn\":\"3641170788609141341\",\"purchaseOrderBuyer\":\"douhuotest\",\"purchaseOrderSeller\":\"\\u798f\\u5dde\\u67cf\\u4e3a\\u5546\\u8d38\\u6709\\u9650\\u516c\\u53f8\",\"purchaseOrderPayment\":\"5.98\",\"purchaseOrderFullname\":\"\\u6de1*\",\"purchaseOrderMobile\":\"1********80\",\"purchaseOrderFullAddress\":\"\\u6d59\\u6c5f\\u7701 \\u676d\\u5dde\\u5e02 \\u4f59\\u676d\\u533a \\u4ed3\\u524d\\u8857\\u9053 \\u4f59\\u676d*\\u8def****\",\"purchaseOrderStartTime\":\"2023-11-22 11:03:37\",\"platformPushStatus\":\"wait\",\"purchaseOrderLogisticsName\":\"\",\"purchaseOrderWaybillCode\":\"\",\"purchaseOrderStatus\":\"wait_pay\",\"purchaseOrderFlow\":\"fenxiao\",\"alibabaOrderStatus\":\"waitbuyerpay\",\"isUseManualConsignee\":0,\"isDsEncryptOrder\":0,\"isSupportEncryptOrder\":0,\"logisticsIsAccept\":false,\"items\":[{\"skuId\":\"3386515436145410\",\"wareId\":\"3651940874226638524\",\"purchaseNum\":\"2\",\"purchasePrice\":\"2.99\",\"sourceItemId\":\"712130508984\",\"subItemId\":\"3641170788609141341\"}],\"mergePurchasePlatformOrderIds\":null,\"purchaseOrderUpdateTime\":\"2023-11-22 11:03:37\",\"purchaseOrderPayTime\":null}]}],\"errorList\":null,\"lockSourceItems\":[{\"createPurchaseOrderLockSkuId\":\"2224\",\"createPurchaseOrderLockId\":\"20001680\",\"sourceItemId\":\"712130508984\",\"sourceSkuId\":\"4987755988437\",\"createPurchaseOrderLogId\":\"1553\",\"sourceOrderId\":\"3641170788609141341\",\"sourceNum\":null,\"reqId\":null,\"status\":\"lock\",\"gmtCreate\":\"2023-11-22 11:03:36\",\"gmtModified\":\"2023-11-22 11:03:37\",\"platformOrderId\":\"6923971910449173607\",\"platformItemId\":\"3651940874226638524\",\"platformSkuId\":\"3386515436145410\"}]}";
|
|
|
|
|
// BatchCreateDistributionOrdersResponseDTO response = JSON.parseObject(res, BatchCreateDistributionOrdersResponseDTO.class);
|
|
|
|
|
|
|
|
|
|
List<String> errorList = new ArrayList<>();
|
|
|
|
|
for (DsErrorRetDTO errorRet: response.getErrorList()) {
|
|
|
|
|
errorList.add(errorRet.getReason());
|
|
|
|
|
}
|
|
|
|
|
if (!errorList.isEmpty()) {
|
|
|
|
|
throw new RuntimeException(String.join(";", errorList));
|
|
|
|
|
if (response.getErrorList() != null) {
|
|
|
|
|
List<String> errorList = new ArrayList<>();
|
|
|
|
|
for (DsErrorRetDTO errorRet: response.getErrorList()) {
|
|
|
|
|
errorList.add(errorRet.getReason());
|
|
|
|
|
}
|
|
|
|
|
if (!errorList.isEmpty()) {
|
|
|
|
|
throw new RuntimeException(String.join(";", errorList));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<OrderResult> orderResults = new ArrayList<>();
|
|
|
|
|