| | |
| | | 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.dto.taobao.DaTaoKeFilterResult;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.ShamUser;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoodsClass;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | | import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
|
| | |
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemClientParamsService;
|
| | | import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
|
| | | import com.yeshi.fanli.service.inter.goods.CollectionGoodsV2Service;
|
| | | import com.yeshi.fanli.service.inter.goods.ScanHistoryV2Service;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.jd.JDGoodsClassService;
|
| | | import com.yeshi.fanli.service.inter.money.UserMoneyExtraService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.redpack.UserTaoLiJinNewbiesService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TLJBuyGoodsService;
|
| | |
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.tlj.ConfigTaoLiJinService;
|
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
|
| | | import com.yeshi.fanli.service.manger.user.UserLevelManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | |
| | | import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
|
| | | import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
|
| | | import com.yeshi.fanli.util.cache.TaoBaoGoodsCacheUtil;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | | import com.yeshi.fanli.util.factory.goods.ShopInfoVOFactory;
|
| | | import com.yeshi.fanli.util.jd.JDApiUtil;
|
| | |
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.user.UserLevelUtil;
|
| | | import com.yeshi.fanli.vo.goods.CouponInfoVO;
|
| | | import com.yeshi.fanli.vo.goods.GoodsDetailExtraVO;
|
| | | import com.yeshi.fanli.vo.goods.GoodsDetailVO;
|
| | |
| | | private TaoBaoUnionConfigService taoBaoUnionConfigService;
|
| | |
|
| | | @Resource
|
| | | private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
|
| | | private DaTaoKeGoodsDetailV2Service daTaoKeGoodsDetailV2Service;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private SystemClientParamsService systemClientParamsService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserVIPInfoService userVIPInfoService;
|
| | |
|
| | | @Resource
|
| | | private UserVipConfigService userVipConfigService;
|
| | |
|
| | | @Resource
|
| | | private GoodsEvaluateService goodsEvaluateService;
|
| | |
|
| | | @Resource
|
| | | private UserLevelManager userLevelManager;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | | private ConfigParamsDTO getParamsDTO(String platform, String version, Long uid) {
|
| | | UserLevelEnum level = UserLevelEnum.daRen;
|
| | | if (uid != null && uid > 0) {
|
| | | level = userLevelManager.getUserLevel(uid);
|
| | | if (level != null) {
|
| | | if (System.currentTimeMillis() < Constant.NEW_ORDER_FANLI_RULE_TIME)
|
| | | level = UserLevelUtil.getOldLevel(level);
|
| | | }
|
| | | }
|
| | | if (level == null)
|
| | | level = UserLevelEnum.daRen;
|
| | | return orderHongBaoMoneyComputeService.getShowComputeRate(platform, version, level);
|
| | | }
|
| | |
|
| | | private TaoBaoGoodsBrief filterDaTaoKeGoodsInfo(TaoBaoGoodsBrief goods) {
|
| | | try {
|
| | | DaTaoKeFilterResult result = daTaoKeGoodsDetailV2Service.filterTaoBaoGoods(goods);
|
| | | if (result.getFilterType() == DaTaoKeFilterResult.FILTER_TYPE_COUPON
|
| | | || result.getFilterType() == DaTaoKeFilterResult.FILTER_TYPE_PRICE_AND_COUPON) {
|
| | | // 缓存基础链接
|
| | | String dpid = null;
|
| | | if (TaoBaoUtil.isSpecialGoods(goods.getMaterialLibType())) {
|
| | | dpid = TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT;
|
| | | } else {
|
| | | dpid = TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID;
|
| | | }
|
| | | String link = taoBaoGoodsCacheUtil.getBaseConvertLink(goods.getAuctionId(), dpid);
|
| | | if (!StringUtil.isNullOrEmpty(link)) {
|
| | | // result.getGoods().setCouponLink(link);
|
| | | return result.getGoods();
|
| | | } else {
|
| | | link = DaTaoKeApiUtil.convertLink(goods.getAuctionId(), dpid);
|
| | | if (!StringUtil.isNullOrEmpty(link)) {
|
| | | // result.getGoods().setCouponLink(link);
|
| | | taoBaoGoodsCacheUtil.cacheBaseConvertLink(goods.getAuctionId(), dpid, link);
|
| | | }
|
| | | return result.getGoods();
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | return goods;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 淘宝商品详情
|
| | |
| | | app.setPid(TaoBaoConstant.TAOBAO_COMMON_PID);
|
| | | app.setAdzoneId(TaoBaoConstant.TAOBAO_COMMON_PID.split("_")[3]);
|
| | | goods = TaoKeApiUtil.searchGoodsDetail(id, app);
|
| | |
|
| | | final TaoBaoGoodsBrief finalGoods = goods;
|
| | | if (goods != null) {
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
| | | } catch (TaobaoGoodsDownException e) {
|
| | | // 商品下架
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | | public void run() {
|
| | | taoBaoGoodsUpdateService.offlineTaoBaoGoods(id);
|
| | | }
|
| | |
| | |
|
| | | // 大淘客商品过滤
|
| | | try {
|
| | | goods = daTaoKeGoodsDetailService.filterTaoBaoGoods(goods);
|
| | | goods = filterDaTaoKeGoodsInfo(goods);
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), uid);
|
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate());
|
| | |
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
|
| | | if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
|
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo().setShareMoney(
|
| | | "¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setShareMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods,
|
| | | hongBaoManageService.getShareRate(UserLevelEnum.superVIP)));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
|
| | | if (TaoBaoUtil.isYUShou(goods)) {
|
| | | if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
|
| | |
| | | }
|
| | |
|
| | | extraVO.setTbPidInfo(clientTBPid);
|
| | | extraVO.setDetailUrl("http://apph5.yeshitv.com/apppage/goods_img.html?id=" + id);
|
| | | extraVO.setDetailUrl("http://apph5.banliapp.com/apppage/goods_img.html?id=" + id);
|
| | |
|
| | | // 分享赚人提示
|
| | | MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
|
| | |
| | |
|
| | | 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) {
|
| | | extraVO.setH5Url(h5Url);
|
| | | }
|
| | |
|
| | | extraVO.setH5Url(h5Url);
|
| | |
|
| | | String helpLink = null;
|
| | | boolean fanliValid = true;
|
| | |
| | | moneyType = 2;
|
| | | fanliValid = true;
|
| | | shareValid = false;
|
| | | helpLink = configService.get("zigoulijian_nofanli_help");
|
| | | helpLink = configService.get(ConfigKeyEnum.zigoulijianNofanliHelp.getKey());
|
| | |
|
| | | BigDecimal tljHongBao = TaoBaoUtil.getGoodsHongBaoMoney(goods, TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE);
|
| | |
|
| | |
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
|
| | | else
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | | rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | rewardCoupon.setDesc("返");
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | | rewardCoupon.getJumpDetail().setNeedLogin(true);
|
| | | } else
|
| | | rewardCoupon.setDesc("用返利奖励券最高返");
|
| | | rewardCoupon.setParams(params1.toString());
|
| | |
|
| | | otherInfo.setRewardCoupon(rewardCoupon);
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
|
| | | otherInfo.setRewardCoupon(null);
|
| | |
|
| | | goodsDetail.setOtherInfo(otherInfo);
|
| | | }
|
| | | extraVO.setFanliValid(fanliValid);
|
| | |
| | |
|
| | | // 分享路径
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | // 分享路径
|
| | |
| | | shareInfoVO.setHelpLink(helpLink);
|
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | if (goodsDetail.isHasCoupon()) {
|
| | | // 设置couponList
|
| | | List<CouponInfoVO> couponInfoList = new ArrayList<>();
|
| | | couponInfoList.add(goodsDetail.getCouponInfo());
|
| | | goodsDetail.setCouponInfoList(couponInfoList);
|
| | | }
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("extra", JsonUtil.getApiCommonGson().toJson(extraVO));
|
| | | object.put("goods", JsonUtil.getApiCommonGson().toJson(goodsDetail));
|
| | |
| | | * @param from
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getDetailJD", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getDetailJD")
|
| | | public void getDetialJD(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
|
| | | // uid=2255993L;
|
| | | // 系统验证
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | |
| | | // 保存缓存
|
| | | jdGoodsCacheUtil.saveGoodsInfo(jdGoods);
|
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), uid);
|
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate());
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, paramsDTO);
|
| | | if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
|
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setShareMoney("¥"
|
| | | + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getShareRate(UserLevelEnum.superVIP)));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
|
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | |
| | | otherInfo.setFanliMoneyPlus("京东plus返¥" + fanliMoneyPlus);
|
| | | // 使用奖励券最高返
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | maxMoneyPlus = "(京东plus返¥"
|
| | | + JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
|
| | | hongBaoManageService.getVIPFanLiRate())
|
| | | + ")";
|
| | | maxMoneyPlus = "(京东plus返¥" + JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
|
| | | hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)) + ")";
|
| | | } else
|
| | | maxMoneyPlus = "(京东plus最高返¥"
|
| | | + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
|
| | |
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
|
| | | else
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | |
|
| | | rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | rewardCoupon.setDesc("返");
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | | rewardCoupon.getJumpDetail().setNeedLogin(true);
|
| | | } else {
|
| | | rewardCoupon.setDesc("用返利奖励券最高返");
|
| | | }
|
| | | rewardCoupon.setParams(params1.toString());
|
| | |
|
| | | otherInfo.setRewardCoupon(rewardCoupon);
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
|
| | | otherInfo.setRewardCoupon(null);
|
| | |
|
| | | goodsDetail.setOtherInfo(otherInfo);
|
| | |
|
| | | CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
|
| | |
| | | List<ShamUser> listShareUser = new ArrayList<ShamUser>();
|
| | |
|
| | | // 京东开启分享
|
| | | String open = configService.get("share_jd_open");
|
| | | String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
|
| | | if ("1".equals(open.trim())) {
|
| | | extraVO.setShareValid(true);
|
| | | MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
|
| | |
| | | extraVO.setFanliValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | out.print(JsonUtil.loadTrueResult(object.toString()));
|
| | |
|
| | | final JDGoods goods = jdGoods;
|
| | | final Long fuid = uid;
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | | // 添加浏览记录
|
| | | try {
|
| | | scanHistoryV2Service.addJDScanHistory(uid, acceptData.getDevice(), goods);
|
| | | scanHistoryV2Service.addJDScanHistory(fuid, acceptData.getDevice(), goods);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | goodsEvaluateService.updateJDGoods(goods);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), uid);
|
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate());
|
| | |
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, paramsDTO);
|
| | | if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
|
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo().setShareMoney(
|
| | | "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setShareMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods,
|
| | | hongBaoManageService.getShareRate(UserLevelEnum.superVIP)));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
|
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | |
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
|
| | | else
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | |
|
| | | rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | rewardCoupon.setDesc("返");
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | | rewardCoupon.getJumpDetail().setNeedLogin(true);
|
| | | } else
|
| | | rewardCoupon.setDesc("用返利奖励券最高返");
|
| | | rewardCoupon.setParams(params1.toString());
|
| | | otherInfo.setRewardCoupon(rewardCoupon);
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
|
| | | otherInfo.setRewardCoupon(null);
|
| | | goodsDetail.setOtherInfo(otherInfo);
|
| | |
|
| | | CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
|
| | |
| | | }
|
| | |
|
| | | // 图文详情
|
| | | extraVO.setDetailUrl("http://apph5.yeshitv.com/apppage/goods_img_pdd.html?id=" + id);
|
| | | extraVO.setDetailUrl("http://apph5.banliapp.com/apppage/goods_img_pdd.html?id=" + id);
|
| | |
|
| | | String salesTip = pddGoods.getSalesTip();
|
| | | if (!StringUtil.isNullOrEmpty(salesTip)) {
|
| | |
| | | extraVO.setShareValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | // 添加浏览记录
|
| | | try {
|
| | | scanHistoryV2Service.addPDDScanHistory(uid, acceptData.getDevice(), pddGoods);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | try {
|
| | | goodsEvaluateService.updatePDDGoods(pddGoods);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | list = list.subList(0, 10);
|
| | | }
|
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null);
|
| | | List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>();
|
| | |
|
| | | for (JDGoods goods : list) {
|
| | |
| | | goodsList = goodsList.subList(0, 10);
|
| | | }
|
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService
|
| | | .getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(),
|
| | | null);
|
| | | for (PDDGoodsDetail goods : goodsList) {
|
| | | listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO));
|
| | | }
|
| | |
| | |
|
| | | if (goodsList != null && goodsList.size() > 0) {
|
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null);
|
| | |
|
| | | goodsList.parallelStream().forEach(goods -> {
|
| | | if (goods != null) {
|
| | |
| | | }
|
| | | jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_FANLI + "",
|
| | | uid + "");
|
| | | if (jumpLink == null) {
|
| | | jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, null, JDApiUtil.POSITION_FANLI + "",
|
| | | uid + "");
|
| | | }
|
| | | } else {
|
| | | jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_FANLI + "",
|
| | | uid + "");
|
| | |
| | | PDDPromotionUrl convertUrl = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_FANLI + "", uid + "");
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("native", true);
|
| | |
|
| | | data.put("jumpLink", convertUrl.getUrl());
|
| | | data.put("nativeJumpLink", PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
| | | Map<String, GoodsDetailVO> tempGoodsList = new HashMap<>();
|
| | |
|
| | | ConfigParamsDTO params = new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
|
| | | hongBaoManageService.getShareRate(), new BigDecimal(80), hongBaoManageService.getVIPFanLiRate());
|
| | | hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
|
| | | hongBaoManageService.getShareRate(), new BigDecimal(80),
|
| | | hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP));
|
| | |
|
| | | if (tbGoodsList.size() > 0) {
|
| | | List<TaoBaoGoodsBrief> goodsList = null;
|