|
|
|
@ -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()));
|
|
|
|
|