| | |
| | | return result;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * 获取大淘客品牌优选 品牌id
|
| | | *
|
| | |
| | | for (int cid : cidList)
|
| | | cids += cid + ",";
|
| | | cids = cids.endsWith(",") ? cids.substring(0, cids.length() - 1) : cids;
|
| | | |
| | |
|
| | | params.put("cids", cids + "");
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | return hotWords;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 高效转链
|
| | | * @Title: convertLink
|
| | | * @Description: |
| | | * @param auctionId
|
| | | * @param pid |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static String convertLink(Long auctionId, String pid) {
|
| | | TaoKeAppInfo app = APP_KEYS[1];
|
| | | Map<String, String> params = new TreeMap<>();
|
| | | params.put("version", "v1.1.1");
|
| | | params.put("goodsId", auctionId + "");
|
| | | params.put("pid", pid);
|
| | | params.put("appKey", app.getAppKey());
|
| | | params.put("sign", getSign(params, app.getAppSecret()));
|
| | |
|
| | | String result = null;
|
| | | try {
|
| | | result = HttpUtil.get("https://openapi.dataoke.com/api/tb-service/get-privilege-link", params,
|
| | | new HashMap<>());
|
| | | } catch (Exception e) {
|
| | | result = HttpUtil.get("https://openapi.dataoke.com/api/tb-service/get-privilege-link", params,
|
| | | new HashMap<>());
|
| | | }
|
| | | |
| | | System.out.println(result);
|
| | |
|
| | | JSONObject json = JSONObject.fromObject(result);
|
| | | if (json != null) {
|
| | | json = json.getJSONObject("data");
|
| | | if (json != null) {
|
| | | return json.optString("couponClickUrl");
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | | }
|