| | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoLiJinUtil;
|
| | | import com.yeshi.fanli.vo.goods.CouponInfoVO;
|
| | | import com.yeshi.fanli.vo.goods.GoodsDetailExtraVO;
|
| | | import com.yeshi.fanli.vo.goods.GoodsDetailVO;
|
| | | import com.yeshi.fanli.vo.goods.MoneyInfoVO;
|
| | |
| | | extraVO.setIsNative(true);
|
| | | }
|
| | |
|
| | | // 商品链接
|
| | | String h5Url = String.format("http://%s%s?id=%s&appType=flq", configService.getH5Host(),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePath(), id + "");
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePath(), "", id + "");
|
| | | try {
|
| | | extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | | } catch (Exception e) {
|
| | |
| | | }
|
| | |
|
| | | // 分享路径
|
| | | String shareUrl = String.format("%s?id=" + id, Constant.systemCommonConfig.getAppShareInfoUrl());
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | | shareInfoVO.setUrl(shareUrl);
|
| | | shareInfoVO.setHelpLink(helpLink);
|
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | |
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, null, fanLiRate, shareRate);
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, fanLiRate, shareRate);
|
| | |
|
| | | CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
|
| | | if (couponInfo != null) {
|
| | | // 券链接处理
|
| | | String materialId = "https://item.jd.com/" + id + ".html";
|
| | | String url = JDApiUtil.convertShortLink(materialId, couponInfo.getLink(), JDApiUtil.POSITION_COUPON+"", null);
|
| | | couponInfo.setLink(url);
|
| | | }
|
| | | |
| | | ShopInfoVO shopInfo = goodsDetail.getShopInfo();
|
| | | if (shopInfo != null) {
|
| | | if (shopInfo.getId() == null || shopInfo.getScoreGoods() == null || shopInfo.getScoreLogistics() == null
|
| | |
| | | }
|
| | |
|
| | | // 商品链接
|
| | | String h5Url = String.format("http://%s%s?id=%s&appType=flq&goodsType=%s", configService.getH5Host(),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePath(), jdGoods.getSkuId() + "", Constant.SOURCE_TYPE_JD);
|
| | | 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) {
|
| | |
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | }
|
| | |
|
| | | // 分享路径
|
| | | String shareUrl = String.format("%s?id=" + jdGoods.getSkuId(),
|
| | | Constant.systemCommonConfig.getAppShareInfoUrl());
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | | shareInfoVO.setUrl(shareUrl);
|
| | | shareInfoVO.setHelpLink(helpLink);
|
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | |
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, null, fanLiRate, shareRate);
|
| | |
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, fanLiRate, shareRate);
|
| | | CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
|
| | | if (couponInfo != null) {
|
| | | String url = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_COUPON + "", null);
|
| | | couponInfo.setLink(url);
|
| | | }
|
| | | |
| | | ShopInfoVO shopInfo = goodsDetail.getShopInfo();
|
| | | if (shopInfo != null) {
|
| | | if (shopInfo.getId() == null || shopInfo.getScoreGoods() == null || shopInfo.getScoreLogistics() == null
|
| | |
| | | extraVO.setIsNative(true);
|
| | | }
|
| | |
|
| | | // 商品链接
|
| | | String h5Url = String.format("http://%s%s?id=%s&appType=flq&goodsType=%s", configService.getH5Host(),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePath(), id + "", Constant.SOURCE_TYPE_PDD);
|
| | | // 分享路径
|
| | | 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) {
|
| | |
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | }
|
| | | // 分享路径
|
| | | String shareUrl = String.format("%s?id=" + id, Constant.systemCommonConfig.getAppShareInfoUrl());
|
| | | |
| | | ShareVO shareInfoVO = new ShareVO();
|
| | | shareInfoVO.setUrl(shareUrl);
|
| | | shareInfoVO.setHelpLink(helpLink);
|
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | |
| | | List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>();
|
| | |
|
| | | for (JDGoods goods: list) {
|
| | | listDetailVO.add(GoodsDetailVOFactory.convertJDGoods(goods, null, fanLiRate, shareRate));
|
| | | listDetailVO.add(GoodsDetailVOFactory.convertJDGoods(goods, fanLiRate, shareRate));
|
| | | }
|
| | |
|
| | | // 取偶数个数据
|
| | |
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | for (PDDGoodsDetail goods : goodsList) {
|
| | | listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, null, fanLiRate, shareRate));
|
| | | listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, fanLiRate, shareRate));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | if (couponInfo != null) {
|
| | | couponUrl = couponInfo.getLink();
|
| | | }
|
| | | String jumpLink = JDApiUtil.convertLink(materialId, couponUrl, JDApiUtil.POSITION_FANLI + "", id + "");
|
| | | String jumpLink = JDApiUtil.convertShortLink(materialId, couponUrl, JDApiUtil.POSITION_FANLI + "", uid + "");
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("native", true);
|