From 6f14a131b39c8fc44b29b6130c4e2002bbf2d3ca Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期日, 29 九月 2019 14:51:23 +0800 Subject: [PATCH] 返利奖励券H5接口增加 --- fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java index da0f5f8..d9be144 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java @@ -1502,9 +1502,13 @@ 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(); } @@ -2081,6 +2085,24 @@ 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 { -- Gitblit v1.8.0