| | |
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.dto.taobao.haodanku.HDKGoodsListResultDTO;
|
| | | import com.yeshi.fanli.dto.taobao.haodanku.HDKSearchFilter;
|
| | | import com.yeshi.fanli.dto.taobao.haodanku.HDKWXCircleContentDTO;
|
| | | import com.yeshi.goods.facade.entity.taobao.HDKGoodsDetail;
|
| | | import com.yeshi.goods.facade.dto.taobao.haodanku.HDKGoodsListResultDTO;
|
| | | import com.yeshi.goods.facade.dto.taobao.haodanku.HDKSearchFilter;
|
| | | import com.yeshi.goods.facade.dto.taobao.haodanku.HDKWXCircleContentDTO;
|
| | | import com.yeshi.goods.facade.entity.taobao.haodanku.HDKGoodsDetail;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | |
| | | System.out.println(result);
|
| | | }
|
| | |
|
| | | public String convertLink(Long auctionId, String pid, String activityId) {
|
| | | public String convertLink(Long auctionId, String pid, String activityId,String specialId,String relationId) {
|
| | | List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
|
| | | params.add(new ParamsKeyValue("itemid", auctionId + ""));
|
| | | params.add(new ParamsKeyValue("pid", pid));
|
| | | if(!StringUtil.isNullOrEmpty(specialId)){
|
| | | params.add(new ParamsKeyValue("special_id", specialId));
|
| | | }
|
| | |
|
| | | if(!StringUtil.isNullOrEmpty(relationId)){
|
| | | params.add(new ParamsKeyValue("relation_id", relationId));
|
| | | }
|
| | |
|
| | |
|
| | | if (activityId != null)
|
| | | params.add(new ParamsKeyValue("activityid", activityId));
|
| | | String result = basePostRequest("http://v2.api.haodanku.com/ratesurl", params);
|
| | | System.out.println(result);
|
| | | JSONObject resultData = JSONObject.fromObject(result);
|
| | | String link = "";
|
| | | if (resultData.optInt("code") == 1) {
|