| | |
| | | // 商品链接
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePathJD(), "", id + "");
|
| | | // try {
|
| | | // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | | // } catch (Exception e) {
|
| | | extraVO.setH5Url(h5Url);
|
| | | // }
|
| | | // try {
|
| | | // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | | // } catch (Exception e) {
|
| | | extraVO.setH5Url(h5Url);
|
| | | // }
|
| | |
|
| | | String helpLink = null;
|
| | | extraVO.setFanliValid(true);
|
| | |
| | | // 分享路径
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
|
| | | // try {
|
| | | // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | | // } catch (Exception e) {
|
| | | extraVO.setH5Url(h5Url);
|
| | | // }
|
| | | // try {
|
| | | // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | | // } catch (Exception e) {
|
| | | extraVO.setH5Url(h5Url);
|
| | | // }
|
| | |
|
| | | String helpLink = null;
|
| | | extraVO.setFanliValid(true);
|
| | |
| | | // 分享路径
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
|
| | | // try {
|
| | | // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | | // } catch (Exception e) {
|
| | | extraVO.setH5Url(h5Url);
|
| | | // }
|
| | | // try {
|
| | | // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | | // } catch (Exception e) {
|
| | | extraVO.setH5Url(h5Url);
|
| | | // }
|
| | |
|
| | | String helpLink = null;
|
| | | extraVO.setFanliValid(true);
|
| | |
| | | } else {
|
| | | jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_FANLI + "",
|
| | | uid + "");
|
| | | if (StringUtil.isNullOrEmpty(jumpLink)) {
|
| | | jumpLink = couponUrl;
|
| | | }
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | |
| | | String materialId = "https://item.jd.com/" + id + ".html";
|
| | |
|
| | | jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_FANLI + "", null);
|
| | | if (StringUtil.isNullOrEmpty(jumpLink)) {
|
| | | jumpLink = couponUrl;
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("native", true);
|
| | |
| | | } else {
|
| | | data.put("extend", true);
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) {
|
| | | VIPGoodsInfo goods = VipShopApiUtil.getGoodsDetail(goodsId);
|
| | | if (goods == null) {
|
| | | data.put("extend", false);
|
| | | data.put("url","");
|
| | | } else {
|
| | | data.put("extend", true);
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) {
|
| | | SuningGoodsInfo goods = SuningApiUtil.getGoodsDetail(goodsId.split("-")[1], goodsId.split("-")[0]);
|
| | | if (goods == null) {
|
| | | data.put("extend", false);
|
| | | data.put("url", String.format("https://m.suning.com/product/%s/%s.html", goodsId.split("-")[0],goodsId.split("-")[1]));
|
| | | } else {
|
| | | data.put("extend", true);
|
| | | }
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|