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

@ -50,20 +50,18 @@ public class DDApi {
SupplyCenterOrderConfirmRequest request = new SupplyCenterOrderConfirmRequest();
request.setParam(param);
SupplyCenterOrderConfirmResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
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) {
log.info("DdApi:{}", "supplyCenterOrderConfirm");
log.info("DdApi:{}", "supplyCenterOrderSyncSupplierInfo");
SupplyCenterOrderSyncSupplierInfoRequest request = new SupplyCenterOrderSyncSupplierInfoRequest();
request.setParam(param);
SupplyCenterOrderSyncSupplierInfoResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
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();
request.setParam(param);
SupplyCenterOrderLogisticsResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
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();
request.setParam(param);
SupplyCenterOrderCancelResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
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();
request.setParam(param);
SupplyCenterOrderPayResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
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();
request.setParam(param);
SupplyCenterRefundOperateResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
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();
request.setParam(param);
SupplyCenterCargoDetailResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
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();
request.setParam(param);
SupplyCenterOrderQueryResponse response = execute(request);
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
if (success && ObjectUtil.isNotEmpty(response.getData())) {
if (response.isSuccess()) {
return response.getData();
}
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));

Loading…
Cancel
Save