|
|
|
@ -22,6 +22,7 @@ import com.doudian.open.api.order_logisticsCompanyList.OrderLogisticsCompanyList
|
|
|
|
|
import com.doudian.open.api.order_logisticsCompanyList.data.DataItem;
|
|
|
|
|
import com.doudian.open.api.order_orderDetail.OrderOrderDetailRequest;
|
|
|
|
|
import com.doudian.open.api.order_orderDetail.OrderOrderDetailResponse;
|
|
|
|
|
import com.doudian.open.api.order_orderDetail.data.OrderOrderDetailData;
|
|
|
|
|
import com.doudian.open.api.order_orderDetail.data.ShopOrderDetail;
|
|
|
|
|
import com.doudian.open.api.order_orderDetail.param.OrderOrderDetailParam;
|
|
|
|
|
import com.doudian.open.api.order_searchList.OrderSearchListRequest;
|
|
|
|
@ -162,4 +163,20 @@ public class DdRequestUtil {
|
|
|
|
|
throw new RuntimeException(String.format("抖店请求错误:msg:%s,code:%s,subCode:%s,subMsg:%s,", response.getMsg(), response.getCode(), response.getSubCode(), response.getSubMsg()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static OrderOrderDetailData orderDetailRequest(OrderOrderDetailParam param) {
|
|
|
|
|
String activeProfile= System.getenv("sys-deploy-env");
|
|
|
|
|
if (!"Prod".equals(activeProfile)){
|
|
|
|
|
AuthThreadLocalUtil.set(AppConst.TEST_SHOP_ID);
|
|
|
|
|
}
|
|
|
|
|
OrderOrderDetailRequest request = new OrderOrderDetailRequest();
|
|
|
|
|
request.setParam(param);
|
|
|
|
|
log.info("=============Dd请求餐素:{}===================", JSONObject.toJSONString(param));
|
|
|
|
|
OrderOrderDetailResponse response = request.execute();
|
|
|
|
|
log.info("=============Dd请求返回:{}===================", JSONObject.toJSONString(response));
|
|
|
|
|
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()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|