20240115-ljl-multiPay
ljl 12 months ago
parent 31d813f570
commit 7de099f79f

@ -258,7 +258,7 @@ public class DsMessageServiceImpl implements DsMessageService {
case PurchaseOrderConst.PURCHASE_ORDER_STATUS_WAIT_SEND: case PurchaseOrderConst.PURCHASE_ORDER_STATUS_WAIT_SEND:
handlePurchaseOrderAfterPay(purchaseOrderDTO, purchaseOrder, skuIdAndPlatformPurchaseOrderSkuMap); handlePurchaseOrderAfterPay(purchaseOrderDTO, purchaseOrder, skuIdAndPlatformPurchaseOrderSkuMap);
break; break;
case PurchaseOrderConst.PURCHASE_ORDER_STATUS_WAIT_CONFIRM: case PurchaseOrderConst.PURCHASE_ORDER_STATUS_HAS_SEND:
handlePurchaseOrderAfterSend(purchaseOrderDTO, purchaseOrder); handlePurchaseOrderAfterSend(purchaseOrderDTO, purchaseOrder);
break; break;
case PurchaseOrderConst.PURCHASE_ORDER_STATUS_FINISHED: case PurchaseOrderConst.PURCHASE_ORDER_STATUS_FINISHED:
@ -297,7 +297,7 @@ public class DsMessageServiceImpl implements DsMessageService {
for (PurchaseOrderItemDTO item: purchaseOrderDTO.getItems()) { for (PurchaseOrderItemDTO item: purchaseOrderDTO.getItems()) {
PlatformPurchaseOrderSku platformPurchaseOrderSku = skuIdAndPlatformPurchaseOrderSkuMap.get(item.getSkuId()); PlatformPurchaseOrderSku platformPurchaseOrderSku = skuIdAndPlatformPurchaseOrderSkuMap.get(item.getSkuId());
SkuOrderPayInfosItem skuOrderPayInfosItem = new SkuOrderPayInfosItem(); SkuOrderPayInfosItem skuOrderPayInfosItem = new SkuOrderPayInfosItem();
skuOrderPayInfosItem.setPayAmount((long)(item.getPurchasePrice() * 100)); skuOrderPayInfosItem.setPayAmount((long)(item.getPurchasePrice() * 100 * item.getPurchaseNum()));
skuOrderPayInfosItem.setPurSkuOrderId(platformPurchaseOrderSku.getPurSkuOrderId()); skuOrderPayInfosItem.setPurSkuOrderId(platformPurchaseOrderSku.getPurSkuOrderId());
skuOrderPayInfosItems.add(skuOrderPayInfosItem); skuOrderPayInfosItems.add(skuOrderPayInfosItem);
} }
@ -306,7 +306,7 @@ public class DsMessageServiceImpl implements DsMessageService {
} }
private void handlePurchaseOrderAfterSend(PurchaseOrderDTO purchaseOrderDTO, PurchaseOrder purchaseOrder) { private void handlePurchaseOrderAfterSend(PurchaseOrderDTO purchaseOrderDTO, PurchaseOrder purchaseOrder) {
Date purchaseOrderSendTime = CommonTool.parseDate(purchaseOrderDTO.getPurchaseOrderSendTime()); Date purchaseOrderSendTime = CommonTool.parseDate(purchaseOrderDTO.getPurchaseOrderUpdateTime());
purchaseOrder.setPurchaseOrderSendTime(purchaseOrderSendTime); purchaseOrder.setPurchaseOrderSendTime(purchaseOrderSendTime);
purchaseOrder.setPurchaseOrderLogisticsName(purchaseOrder.getPurchaseOrderLogisticsName()); purchaseOrder.setPurchaseOrderLogisticsName(purchaseOrder.getPurchaseOrderLogisticsName());
purchaseOrder.setPurchaseOrderWaybillCode(purchaseOrder.getPurchaseOrderWaybillCode()); purchaseOrder.setPurchaseOrderWaybillCode(purchaseOrder.getPurchaseOrderWaybillCode());

@ -50,20 +50,18 @@ public class DDApi {
SupplyCenterOrderConfirmRequest request = new SupplyCenterOrderConfirmRequest(); SupplyCenterOrderConfirmRequest request = new SupplyCenterOrderConfirmRequest();
request.setParam(param); request.setParam(param);
SupplyCenterOrderConfirmResponse response = execute(request); SupplyCenterOrderConfirmResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
} }
public static SupplyCenterOrderSyncSupplierInfoData supplyCenterOrderSyncSupplierInfo(SupplyCenterOrderSyncSupplierInfoParam param) { public static SupplyCenterOrderSyncSupplierInfoData supplyCenterOrderSyncSupplierInfo(SupplyCenterOrderSyncSupplierInfoParam param) {
log.info("DdApi:{}", "supplyCenterOrderConfirm"); log.info("DdApi:{}", "supplyCenterOrderSyncSupplierInfo");
SupplyCenterOrderSyncSupplierInfoRequest request = new SupplyCenterOrderSyncSupplierInfoRequest(); SupplyCenterOrderSyncSupplierInfoRequest request = new SupplyCenterOrderSyncSupplierInfoRequest();
request.setParam(param); request.setParam(param);
SupplyCenterOrderSyncSupplierInfoResponse response = execute(request); SupplyCenterOrderSyncSupplierInfoResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
@ -74,8 +72,7 @@ public class DDApi {
SupplyCenterOrderLogisticsRequest request = new SupplyCenterOrderLogisticsRequest(); SupplyCenterOrderLogisticsRequest request = new SupplyCenterOrderLogisticsRequest();
request.setParam(param); request.setParam(param);
SupplyCenterOrderLogisticsResponse response = execute(request); SupplyCenterOrderLogisticsResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
@ -86,8 +83,7 @@ public class DDApi {
SupplyCenterOrderCancelRequest request = new SupplyCenterOrderCancelRequest(); SupplyCenterOrderCancelRequest request = new SupplyCenterOrderCancelRequest();
request.setParam(param); request.setParam(param);
SupplyCenterOrderCancelResponse response = execute(request); SupplyCenterOrderCancelResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
@ -98,8 +94,7 @@ public class DDApi {
SupplyCenterOrderPayRequest request = new SupplyCenterOrderPayRequest(); SupplyCenterOrderPayRequest request = new SupplyCenterOrderPayRequest();
request.setParam(param); request.setParam(param);
SupplyCenterOrderPayResponse response = execute(request); SupplyCenterOrderPayResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
@ -110,8 +105,7 @@ public class DDApi {
SupplyCenterRefundOperateRequest request = new SupplyCenterRefundOperateRequest(); SupplyCenterRefundOperateRequest request = new SupplyCenterRefundOperateRequest();
request.setParam(param); request.setParam(param);
SupplyCenterRefundOperateResponse response = execute(request); SupplyCenterRefundOperateResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
@ -122,8 +116,7 @@ public class DDApi {
SupplyCenterCargoDetailRequest request = new SupplyCenterCargoDetailRequest(); SupplyCenterCargoDetailRequest request = new SupplyCenterCargoDetailRequest();
request.setParam(param); request.setParam(param);
SupplyCenterCargoDetailResponse response = execute(request); SupplyCenterCargoDetailResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
@ -134,8 +127,7 @@ public class DDApi {
SupplyCenterOrderQueryRequest request = new SupplyCenterOrderQueryRequest(); SupplyCenterOrderQueryRequest request = new SupplyCenterOrderQueryRequest();
request.setParam(param); request.setParam(param);
SupplyCenterOrderQueryResponse response = execute(request); SupplyCenterOrderQueryResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response); if (response.isSuccess()) {
if (success && ObjectUtil.isNotEmpty(response.getData())) {
return response.getData(); return response.getData();
} }
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg())); throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));

Loading…
Cancel
Save