yujian
2019-10-14 3ac30b4c17cf071ce9c66a59c069ab83efae6d2d
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"));
@@ -2081,6 +2089,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 {