| | |
| | | |
| | | private static DYOrderDto getOrderDetail1(String orderNo) throws KeyOrderException { |
| | | String result = requestByOrderNo1(orderNo); |
| | | try { |
| | | JSONObject root = JSONObject.fromObject(result); |
| | | if (root.optInt("code") != 1000) { |
| | | logger.error(String.format("抖音订单查询出错(超享佣):%s - %s",orderNo, result)); |
| | |
| | | DYOrderDto dto = JsonUtil.getSimpleGson().fromJson(data.toString(),DYOrderDto.class); |
| | | dto.setOrderChannel(Constant.ORDER_CHANNEL_CYX); |
| | | return dto; |
| | | }catch(Exception e){ |
| | | throw new KeyOrderException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | private static DYOrderDto getOrderDetail2(String orderNo) throws KeyOrderException { |
| | | String result = requestByOrderNo2(orderNo); |
| | | logger.info(String.format("爆品社接口%s:%s", orderNo, result)); |
| | | System.out.println(result); |
| | | JSONObject data = null; |
| | | try { |
| | | JSONObject root = JSONObject.fromObject(result); |
| | | if (root.optInt("errCode") != 0) { |
| | | logger.error(String.format("抖音订单查询出错(爆品社):%s - %s",orderNo, result)); |
| | | throw new KeyOrderException(root.optString("errMsg")); |
| | | } |
| | | JSONObject data = root.optJSONObject("data"); |
| | | data = root.optJSONObject("data"); |
| | | }catch(Exception e){ |
| | | |
| | | } |
| | | if(data==null){ |
| | | logger.error(String.format("抖音订单查询无数据(2):%s - %s",orderNo, result)); |
| | | throw new KeyOrderException("订单查询无数据"); |