|
|
|
@ -22,6 +22,10 @@ import com.doudian.open.api.supplyCenter_order_pay.SupplyCenterOrderPayRequest;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_pay.SupplyCenterOrderPayResponse;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_pay.data.SupplyCenterOrderPayData;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_pay.param.SupplyCenterOrderPayParam;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_query.SupplyCenterOrderQueryRequest;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_query.SupplyCenterOrderQueryResponse;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_query.data.SupplyCenterOrderQueryData;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_query.param.SupplyCenterOrderQueryParam;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_syncSupplierInfo.SupplyCenterOrderSyncSupplierInfoRequest;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_syncSupplierInfo.SupplyCenterOrderSyncSupplierInfoResponse;
|
|
|
|
|
import com.doudian.open.api.supplyCenter_order_syncSupplierInfo.data.SupplyCenterOrderSyncSupplierInfoData;
|
|
|
|
@ -125,6 +129,18 @@ public class DDApi {
|
|
|
|
|
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static SupplyCenterOrderQueryData supplyCenterOrderQuery(SupplyCenterOrderQueryParam param) {
|
|
|
|
|
log.info("DdApi:{}", "supplyCenterOrderQuery");
|
|
|
|
|
SupplyCenterOrderQueryRequest request = new SupplyCenterOrderQueryRequest();
|
|
|
|
|
request.setParam(param);
|
|
|
|
|
SupplyCenterOrderQueryResponse response = execute(request);
|
|
|
|
|
boolean success = CommonTool.checkDdApiRequestIsSuccess(response);
|
|
|
|
|
if (success && ObjectUtil.isNotEmpty(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()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static <T, R> T execute(DoudianOpRequest<R> request) {
|
|
|
|
|
GlobalConfig.getGlobalConfig().addHttpRequestHeader("X-USE-BOE", "1");
|
|
|
|
|
GlobalConfig.getGlobalConfig().addHttpRequestHeader("Origin-From", "djt_prod");
|
|
|
|
|