| | |
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import com.yeshi.fanli.dto.order.OrderQuery;
|
| | | import com.yeshi.fanli.dto.taobao.TaoBaoOrderResultDTO;
|
| | | import com.yeshi.fanli.dto.taobao.WeiQuanOrderResult;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | |
| | | }
|
| | | }
|
| | | return resultList;
|
| | | }
|
| | |
|
| | | |
| | | @Deprecated
|
| | | private static List<TaoBaoOrder> queryTaoBaoOrder(OrderQuery orderQuery, String appKey, String appSecret) {
|
| | |
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.order.get");
|
| | | map.put("fields",
|
| | | "tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk_status,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,relation_id,tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,special_id,click_time,relation_id,special_id");
|
| | | if (orderQuery.startTime != null)
|
| | | map.put("start_time", orderQuery.startTime);
|
| | | if (orderQuery.span != null)
|
| | | map.put("span", orderQuery.span + "");
|
| | | map.put("page_no", orderQuery.pageNo + "");
|
| | | map.put("page_size", orderQuery.pageSize + "");
|
| | |
|
| | | if (orderQuery.tkStatus != null)
|
| | | map.put("tk_status", orderQuery.tkStatus + "");
|
| | | if (orderQuery.orderQueryType != null)
|
| | | map.put("order_query_type", orderQuery.orderQueryType);
|
| | | if (orderQuery.orderScene != null)
|
| | | map.put("order_scene", orderQuery.orderScene + "");
|
| | |
|
| | | if (orderQuery.orderCountType != null)
|
| | | map.put("order_count_type", orderQuery.orderCountType + "");
|
| | |
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | return parseTaoBaoOrder(json.toString());
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | Thread.sleep(1000);
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | private static List<TaoBaoOrder> parseTaoBaoOrder(String response) {
|