| | |
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class JDApiUtil {
|
| | | public static String APP_ID = "1774659094";
|
| | | public static String APP_KEY = "7ba8e06b7d6fde3d6bd5db4b0026ecd7";
|
| | | public static String SECRET_KEY = "fb49bc6ecac5458ba5394fc2969d7c56";
|
| | | public static String APP_ID = "1864778416";
|
| | | public static String APP_KEY = "388f5133d13a5ea290aa5c44f3ebcc00";
|
| | | public static String SECRET_KEY = "e22367fc866746d98b50d47b4c521781";
|
| | | private static String SERVER_URL = "https://router.jd.com/api";
|
| | |
|
| | | public static long POSITION_FANLI = 1834339426L;
|
| | | public static long POSITION_SHARE = 1834289924L;
|
| | | public static long POSITION_COUPON = 1859510742L;
|
| | | public static long POSITION_FANLI = 1869704794L;
|
| | | public static long POSITION_SHARE = 1869542990L;
|
| | | public static long POSITION_COUPON = 1869704796L;
|
| | |
|
| | | // 订单查询类型
|
| | | public static int ORDER_TYPE_CREATETIME = 1;// 下单时间
|
| | | public static int ORDER_TYPE_FINISHTIME = 2;// 完成时间
|
| | | public static int ORDER_TYPE_UPDATETIME = 3;// 更新时间
|
| | |
|
| | |
|
| | |
|
| | | private static String post2(String url, Map<String, String> params) {
|
| | | String baseUrl = url;
|
| | |
| | | return list.get(0);
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 通过商品搜索接口批量获取详情
|
| | | * |
| | | * @param skuIds
|
| | | * @return
|
| | | */
|
| | | public static List<JDGoods> listGoodsDetail(List<Long> skuIds) {
|
| | | JDFilter filter = new JDFilter();
|
| | | filter.setListId(skuIds);
|
| | | JDSearchResult result = queryByKey(filter);
|
| | | return result.getGoodsList();
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | if (root.optInt("code") == 0) {
|
| | | boolean hasMore = root.optBoolean("hasMore");
|
| | | root = JSONObject.fromObject(root.optString("result"));
|
| | | if (root.optInt("code") == 200&&root.optJSONArray("data")!=null) {
|
| | | |
| | | if (root.optInt("code") == 200 && root.optJSONArray("data") != null) {
|
| | |
|
| | | String date = root.optJSONArray("data").toString();
|
| | | Type typeToken = new TypeToken<List<JDOrder>>() {
|
| | | }.getType();
|