admin
2019-07-11 3824cbcaec6e6c67418d5280a53e9c2fedeef6f9
fanli/src/main/java/com/yeshi/fanli/util/dataoke/DaTaoKeApiUtil.java
@@ -168,10 +168,10 @@
               taoBaoShopDTO.setBrandId(item.optString("brand_id"));
               taoBaoShopDTO.setBrandDes(item.optString("brand_des"));
               taoBaoShopDTO.setUserType(0);
               // 商品信息
               taoBaoShopDTO = getDynamicShopGoods(brandId, taoBaoShopDTO);
               break;
            }
         }
@@ -418,7 +418,6 @@
      return StringUtil.Md5(signStr).toUpperCase();
   }
   /**
    * 获取店铺下前4个商品、店铺介绍
    * 
@@ -429,20 +428,20 @@
      if (brandId == null) {
         return taoBaoShopDTO;
      }
      int userType = 0;
      List<TaoBaoGoodsBrief> listGoods = new ArrayList<TaoBaoGoodsBrief>();
      String result = HttpUtil.get("http://www.dataoke.com/brandGoods?id=" + brandId +"&page=1");
      String result = HttpUtil.get("http://www.dataoke.com/brandGoods?id=" + brandId + "&page=1");
      JSONObject json = JSONObject.fromObject(result);
      JSONArray arrayGoods = json.optJSONArray("goods");
      for (int i = 0; i < arrayGoods.size(); i++) {
         if (i >= 2) {
            break;
         }
         JSONObject itemGoods = arrayGoods.optJSONObject(i);
         TaoBaoGoodsBrief taoBaoGoods = new TaoBaoGoodsBrief();
         taoBaoGoods.setAuctionId(itemGoods.optLong("goodsid"));
         taoBaoGoods.setBiz30day(itemGoods.optInt("xiaoliang"));
@@ -471,7 +470,6 @@
      taoBaoShopDTO.setListGoods(listGoods);
      return taoBaoShopDTO;
   }
   public static int RANK_TYPE_TIME = 1;// 实时
   public static int RANK_TYPE_DAY = 2;// 全天榜
@@ -483,16 +481,17 @@
    * @param type
    * @return
    */
   public static DaTaoKeGoodsResult getRankingList(int type) {
   public static DaTaoKeGoodsResult getRankingList(int type, Integer cid) {
      TaoKeAppInfo app = getRandomApp();
      DaTaoKeGoodsResult daTaoKeGoodsResult = new DaTaoKeGoodsResult();
      Map<String, String> params = new TreeMap<>();
      params.put("version", "v1.0.0");
      params.put("appKey", app.getAppKey());
      params.put("rankType", type + "");
      if (cid != null)
         params.put("cid", cid + "");
      params.put("sign", getSign(params, app.getAppSecret()));
      String result = HttpUtil.get("https://openapi.dataoke.com/api/goods/get-ranking-list", params, new HashMap<>());
      LogHelper.test("getRankingList:" + result);
      JSONObject json = JSONObject.fromObject(result);
      if (json != null) {
         JSONArray array = json.optJSONArray("data");