| | |
| | | import com.yeshi.fanli.dto.jd.JDCouponInfo;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
|
| | | import com.yeshi.fanli.dto.pdd.PDDPromotionUrl;
|
| | | import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.ShamUser;
|
| | |
| | | if (couponInfo != null) {
|
| | | // 券链接处理
|
| | | String materialId = "https://item.jd.com/" + id + ".html";
|
| | | String url = JDApiUtil.convertLink(materialId, couponInfo.getLink(), JDApiUtil.POSITION_COUPON + "",
|
| | | null);
|
| | | String url = JDApiUtil.convertLink(materialId, couponInfo.getLink(), JDApiUtil.POSITION_COUPON + "", null);
|
| | | couponInfo.setLink(url);
|
| | | }
|
| | |
|
| | |
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, fanLiRate, shareRate);
|
| | | CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
|
| | | PDDPromotionUrl convertUrl = null;
|
| | | if (couponInfo != null) {
|
| | | String url = PinDuoDuoApiUtil.getPromotionUrl(id, PinDuoDuoApiUtil.PID_COUPON + "", null);
|
| | | couponInfo.setLink(url);
|
| | | convertUrl = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_COUPON + "", null);
|
| | | if (convertUrl != null)
|
| | | couponInfo.setLink(convertUrl.getShortUrl());
|
| | | }
|
| | |
|
| | | ShopInfoVO shopInfo = goodsDetail.getShopInfo();
|
| | |
| | | extraVO.setStorage(userGoodsStorageService.isExistStorage(uid, id, Constant.SOURCE_TYPE_PDD));
|
| | | }
|
| | |
|
| | | // 测试
|
| | | SystemClientParams params = systemClientParamsService.getSystemClientParamsBySystemAndKey(system,
|
| | | "goods_detail_jump_taobao");
|
| | | if ("1".equalsIgnoreCase((params.getValue() + "").trim())) {
|
| | | extraVO.setIsNative(true);
|
| | | }
|
| | |
|
| | | // 分享路径
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
|
| | |
| | | ShareVO shareInfoVO = new ShareVO();
|
| | | shareInfoVO.setHelpLink(helpLink);
|
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | if (convertUrl != null) {
|
| | | extraVO.setCouponJumpLink(convertUrl.getShortUrl());
|
| | | extraVO.setNativeCouponJumpLink(PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));
|
| | | }
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("extra", JsonUtil.getApiCommonGson().toJson(extraVO));
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | String jumpLink = PinDuoDuoApiUtil.getPromotionUrl(id, PinDuoDuoApiUtil.PID_FANLI + "", uid + "");
|
| | | PDDPromotionUrl convertUrl = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_FANLI + "", uid + "");
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("native", true);
|
| | | data.put("jumpLink", jumpLink);
|
| | | data.put("jumpLink", convertUrl.getShortUrl());
|
| | | data.put("nativeJumpLink", PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|