admin
2021-01-27 e1a62ec62e7331d97af9302e90e1ce44af8235eb
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java
@@ -61,7 +61,7 @@
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.common.entity.PageEntity;
import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
import com.yeshi.fanli.util.factory.CommonGoodsFactory;
@@ -236,7 +236,7 @@
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                  .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
                  acceptData.getVersion());
                  acceptData.getVersion(),acceptData.getSystem());
            for (JDGoods goods : goodsList) {
               GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO);
               if (goodsDetailVO.isHasCoupon()) {
@@ -317,13 +317,13 @@
      jdGoodsCacheUtil.saveGoodsInfo(jdGoods);
      ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
            acceptData.getVersion());
            acceptData.getVersion(),acceptData.getSystem());
      paramsDTO.setMaxRewardRate(null);
      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.getShareRate(UserLevelEnum.superVIP)));
               .setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getShareRate(UserLevelEnum.superVIP,acceptData.getSystem())));
         goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
         goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
      }
@@ -348,12 +348,12 @@
               jdGoods.setCommissionPlus(threeClass.getSelfComm());
               // plus返利
               BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
                     hongBaoManageService.getFanLiRate());
                     hongBaoManageService.getFanLiRate(acceptData.getSystem()));
               otherInfo.setFanliMoneyPlus("京东plus返¥" + fanliMoneyPlus);
               // 使用奖励券最高返
               maxMoneyPlus = "(京东plus返¥"
                     + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)) + ")";
                     + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())) + ")";
            }
         }
@@ -373,7 +373,7 @@
         // 券链接处理
         String materialId = "https://item.jd.com/" + id + ".html";
         String url = JDApiUtil.convertLinkWithSubUnionId(materialId, couponInfo.getLink(),
               JDApiUtil.POSITION_COUPON + "", null);
               null,JDApiUtil.POSITION_COUPON + "", null);
         couponInfo.setLink(url);
      }
@@ -487,13 +487,13 @@
      }
      ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
            acceptData.getVersion());
            acceptData.getVersion(),acceptData.getSystem());
      paramsDTO.setMaxRewardRate(null);
      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.getShareRate(UserLevelEnum.superVIP)));
               "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getShareRate(UserLevelEnum.superVIP,acceptData.getSystem())));
      }
      if (goodsDetail.getCouponInfo() != null) {
@@ -515,7 +515,7 @@
      CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
      PDDPromotionUrl convertUrl = null;
      if (couponInfo != null) {
         convertUrl = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_COUPON + "", null);
         convertUrl = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_COUPON + "", null,false);
         if (convertUrl != null)
            couponInfo.setLink(convertUrl.getUrl());
      }
@@ -646,7 +646,7 @@
            }
            ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
                  acceptData.getVersion());
                  acceptData.getVersion(),acceptData.getSystem());
            List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>();
            for (JDGoods goods : list) {
@@ -678,7 +678,7 @@
               Long[] strings = new Long[goodsIdList.size()];
               pddfilter.setGoodsIdList(goodsIdList.toArray(strings));
               PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter);
               PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter,Constant.PDD_SEARCH_CUSTOMER_PARAMS);
               if (result != null) {
                  List<PDDGoodsDetail> goodsList = result.getGoodsList();
                  if (goodsList != null && goodsList.size() > 0) {
@@ -688,7 +688,7 @@
                     }
                     ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService
                           .getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
                           .getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion(),acceptData.getSystem());
                     for (PDDGoodsDetail goods : goodsList) {
                        listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO));
                     }
@@ -779,7 +779,7 @@
         if (share) {
            position = JDApiUtil.POSITION_SHARE;
         }
         String jdLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, position + "", subUnionId);
         String jdLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, null,position + "", subUnionId);
         try {
            jumpLink = "/pages/union/proxy/proxy?spreadUrl=" + URLEncoder.encode(jdLink, "UTF-8");
         } catch (Exception e) {
@@ -874,7 +874,7 @@
         return;
      }
      ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
            acceptData.getVersion());
            acceptData.getVersion(),acceptData.getSystem());
      GoodsDetailVO goods = GoodsDetailVOFactory.convertJDGoods(jdGoods, paramsDTO);
      String scene = goodsType + "#" + goodsId + "#" + inviteCode;
@@ -932,7 +932,7 @@
         return;
      }
      ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
            acceptData.getVersion());
            acceptData.getVersion(),acceptData.getSystem());
      GoodsDetailVO goods = GoodsDetailVOFactory.convertPDDGoods(pddGoods, paramsDTO);
      String scene = goodsType + "#" + goodsId + "#" + inviteCode;