admin
2019-09-22 b9f8ef2c4737b6e6be4b12fc8f7bafb033bfcfe5
fanli/src/main/java/com/yeshi/fanli/util/dataoke/DaTaoKeApiUtil.java
@@ -189,6 +189,7 @@
               taoBaoShopDTO.setSellerId(item.optLong("seller_id"));
               taoBaoShopDTO.setBrandId(item.optString("brand_id"));
               taoBaoShopDTO.setBrandDes(item.optString("brand_des"));
               taoBaoShopDTO.setShopIcon(item.optString("brand_logo"));
               taoBaoShopDTO.setUserType(0);
               // 商品信息
@@ -542,6 +543,39 @@
      return detail;
   }
   /**
    * 各大榜单
    *
    * @param type
    * @return
    */
   public static String getHotWords() {
      TaoKeAppInfo app = getRandomApp();
      Map<String, String> params = new TreeMap<>();
      params.put("version", "v1.0.1");
      params.put("appKey", app.getAppKey());
      params.put("sign", getSign(params, app.getAppSecret()));
      String result = null;
      try {
         result = HttpUtil.get("https://openapi.dataoke.com/api/category/get-top100", params, new HashMap<>());
      } catch (Exception e) {
         result = HttpUtil.get("https://openapi.dataoke.com/api/category/get-top100", params, new HashMap<>());
      }
      String hotWords = null;
      JSONObject json = JSONObject.fromObject(result);
      if (json != null) {
         json = json.getJSONObject("data");
         if (json != null) {
            hotWords = json.optString("hotWords");
         }
      }
      return hotWords;
   }
   class DaTaoKeResult {
      Date updateTime;
      List<DaTaoKeDetail> dataList;
@@ -555,5 +589,4 @@
      }
   }
}