From 3ac30b4c17cf071ce9c66a59c069ab83efae6d2d Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 14 十月 2019 17:44:13 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java | 10 +++++++++- 1 files changed, 9 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 e208940..de75049 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 @@ -348,6 +348,7 @@ g.setId(goods.getAuctionId()); g.setCreatetime(new Date()); g.setMaterialLibType(goods.getMaterialLibType()); + g.setProvcity(goods.getProvcity()); return g; } } @@ -416,6 +417,7 @@ } g.setCreatetime(new Date()); g.setMaterialLibType(goods.getMaterialLibType()); + g.setProvcity(goods.getProvcity()); return g; } } @@ -917,6 +919,7 @@ goods.setSellerId(item.optLong("seller_id")); goods.setShopTitle(item.optString("shop_title")); goods.setTitle(item.optString("title")); + goods.setProvcity(item.optString("provcity")); if (!StringUtil.isNullOrEmpty(item.optString("level_one_category_id"))) { goods.setRootCatId(item.optInt("level_one_category_id")); @@ -1502,9 +1505,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(); } @@ -1834,6 +1841,7 @@ goods.setSellerId(item.optLong("seller_id")); goods.setShopTitle(item.optString("shop_title")); goods.setTitle(item.optString("title")); + goods.setProvcity(item.optString("provcity")); if (!StringUtil.isNullOrEmpty(item.optString("level_one_category_id"))) { goods.setRootCatId(item.optInt("level_one_category_id")); -- Gitblit v1.8.0