| | |
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.dto.vip.VIPConvertResultDTO;
|
| | | import com.yeshi.fanli.dto.vip.VIPSearchFilter;
|
| | | import com.yeshi.fanli.dto.vip.VIPSearchResult;
|
| | | import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
|
| | |
| | | *
|
| | | * @param goodsId
|
| | | */
|
| | | public static String convertLink(String goodsId, String tag) {
|
| | | public static VIPConvertResultDTO convertLink(String goodsId, String tag) {
|
| | | JSONObject taskParams = new JSONObject();
|
| | | JSONArray goodsIdArray = new JSONArray();
|
| | | goodsIdArray.add(goodsId);
|
| | |
| | | System.out.println(result);
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | if (resultJSON.optInt("returnCode") == 0) {
|
| | | return resultJSON.optJSONObject("result").optJSONArray("urlInfoList").optJSONObject(0).optString("url");
|
| | | String re = resultJSON.optJSONObject("result").optJSONArray("urlInfoList").optJSONObject(0).toString();
|
| | | return new Gson().fromJson(re, VIPConvertResultDTO.class);
|
| | | }
|
| | | return null;
|
| | | }
|