| | |
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.item.click.extract");
|
| | | map.put("click_url", link + "");
|
| | |
|
| | | TaoKeAppInfo app = new TaoKeAppInfo(TaoBaoConstant.TAOBAO_AUTH_APPKEY, TaoBaoConstant.TAOBAO_AUTH_APPSECRET,
|
| | | TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID);
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, true);
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, app);
|
| | | System.out.println(resultJSON);
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取淘宝系统时间
|
| | | * |
| | | * @return
|
| | | */
|
| | | public static Date getTaoBaoSystemTime() {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.time.get");
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, false);
|
| | | String time = json.optJSONObject("time_get_response").optString("time");
|
| | | return new Date(TimeUtil.convertToTimeTemp(time, "yyyy-MM-dd HH:mm:ss"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | | }
|
| | |
|
| | | class QuanInfo {
|