admin
2020-07-03 651a15c78f668bef3859d9ed1bb7ad0b669d3600
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -301,7 +301,7 @@
      // IOS是否正在上线
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
         String version = acceptData.getVersion();
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
      }
      long startTime = java.lang.System.currentTimeMillis();
@@ -320,7 +320,7 @@
      // final List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
      // 是否在服务端进行转链
      boolean convertInServer = configService.isConvertTaoBaoLinkInServer();
      boolean convertInServer = configService.isConvertTaoBaoLinkInServer(acceptData.getSystem());
      TaoBaoGoodsBrief goods = null;
@@ -459,7 +459,7 @@
         goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
      }
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
            .setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
      if (TaoBaoUtil.isYUShou(goods)) {
         if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
@@ -532,7 +532,7 @@
         extraVO.setIsNative(true);
      }
      String h5Url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(),
      String h5Url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(acceptData.getSystem()),
            Constant.systemCommonConfig.getShareGoodsPagePath(), "", id + "");
      extraVO.setH5Url(h5Url);
@@ -554,7 +554,7 @@
         moneyType = 2;
         fanliValid = true;
         shareValid = false;
         helpLink = configService.get(ConfigKeyEnum.zigoulijianNofanliHelp.getKey());
         helpLink = configService.getValue(ConfigKeyEnum.zigoulijianNofanliHelp.getKey(),acceptData.getSystem());
         BigDecimal tljHongBao = TaoBaoUtil.getGoodsHongBaoMoney(goods, TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE,
               false);
@@ -615,7 +615,7 @@
         rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
         JSONObject params1 = new JSONObject();
         if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
            params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
            params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
         else
            params1.put("url", userVipConfigService.getValueByKey("vip_link"));
         rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -629,7 +629,7 @@
         otherInfo.setRewardCoupon(rewardCoupon);
         if ("ios".equalsIgnoreCase(acceptData.getPlatform())
               && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
               && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
            otherInfo.setRewardCoupon(null);
         goodsDetail.setOtherInfo(otherInfo);
@@ -644,7 +644,7 @@
      // 分享路径
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
         helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
      }
      // 分享路径
@@ -733,7 +733,7 @@
         goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
      }
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
            .setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -772,7 +772,7 @@
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      JSONObject params1 = new JSONObject();
      if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
         params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
         params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
      else
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
@@ -788,7 +788,7 @@
      otherInfo.setRewardCoupon(rewardCoupon);
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
         otherInfo.setRewardCoupon(null);
      goodsDetail.setOtherInfo(otherInfo);
@@ -815,14 +815,14 @@
      // IOS是否正在上线
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
         String version = acceptData.getVersion();
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
      }
      Long inOrderCount30Days = jdGoods.getInOrderCount30Days();
      List<ShamUser> listShareUser = new ArrayList<ShamUser>();
      // 京东开启分享
      String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
      String open = configService.getValue(ConfigKeyEnum.shareOpenJD.getKey(),acceptData.getSystem());
      if ("1".equals(open.trim())) {
         extraVO.setShareValid(true);
         MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
@@ -863,7 +863,7 @@
      }
      // 商品链接
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
            Constant.systemCommonConfig.getShareGoodsPagePathJD(), "", id + "");
      // try {
      // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -875,7 +875,7 @@
      extraVO.setFanliValid(true);
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
         helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
      }
      ShareVO shareInfoVO = new ShareVO();
@@ -948,7 +948,7 @@
         goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
      }
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
            .setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -956,7 +956,7 @@
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      JSONObject params1 = new JSONObject();
      if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
         params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
         params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
      else
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
@@ -970,7 +970,7 @@
      rewardCoupon.setParams(params1.toString());
      otherInfo.setRewardCoupon(rewardCoupon);
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
         otherInfo.setRewardCoupon(null);
      goodsDetail.setOtherInfo(otherInfo);
@@ -995,7 +995,7 @@
      // IOS是否正在上线
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
         String version = acceptData.getVersion();
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
      }
      // 图文详情
@@ -1046,7 +1046,7 @@
      extraVO.setIsNative(true);
      // 分享路径
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
            Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
      // try {
      // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -1059,7 +1059,7 @@
      extraVO.setShareValid(true);
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
         helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
      }
      ShareVO shareInfoVO = new ShareVO();
@@ -1146,7 +1146,7 @@
         goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
      }
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
            .setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -1154,7 +1154,7 @@
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      JSONObject params1 = new JSONObject();
      if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
         params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
         params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
      else
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
@@ -1166,7 +1166,7 @@
      rewardCoupon.setParams(params1.toString());
      otherInfo.setRewardCoupon(rewardCoupon);
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
         otherInfo.setRewardCoupon(null);
      goodsDetail.setOtherInfo(otherInfo);
@@ -1183,7 +1183,7 @@
      // IOS是否正在上线
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
         String version = acceptData.getVersion();
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
      }
      // 图文详情
@@ -1201,7 +1201,7 @@
      extraVO.setIsNative(true);
      // 分享路径
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
            Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
      // try {
      // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -1214,7 +1214,7 @@
      extraVO.setShareValid(true);
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
         helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
      }
      ShareVO shareInfoVO = new ShareVO();
@@ -1278,7 +1278,7 @@
         goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
      }
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
            .setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -1296,7 +1296,7 @@
      rewardCoupon.setParams(params1.toString());
      otherInfo.setRewardCoupon(rewardCoupon);
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
         otherInfo.setRewardCoupon(null);
      goodsDetail.setOtherInfo(otherInfo);
@@ -1313,7 +1313,7 @@
      // IOS是否正在上线
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
         String version = acceptData.getVersion();
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
         extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
      }
      // 图文详情
@@ -1335,7 +1335,7 @@
      extraVO.setIsNative(true);
      // 分享路径
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
      String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
            Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
      // try {
      // extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -1348,7 +1348,7 @@
      extraVO.setShareValid(true);
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
         helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
      }
      ShareVO shareInfoVO = new ShareVO();
@@ -1387,9 +1387,9 @@
    */
   private void getCloudInfo(AcceptData acceptData,Long uid, GoodsDetailVO goodsDetail, GoodsDetailExtraVO extraVO) {
      // 云发单是否开启
      boolean cloudOpen = configService.isRobotCloudOpen(ConfigKeyEnum.robotCloudOpenGoodsDetail.getKey(),acceptData.getPlatform(),acceptData.getVersion());
      boolean cloudOpen = configService.isRobotCloudOpen(ConfigKeyEnum.robotCloudOpenGoodsDetail.getKey(),acceptData.getPlatform(),acceptData.getVersion(),acceptData.getSystem());
      if (!cloudOpen && uid != null) {
         List<String> testUsers = configService.getTestUsers();
         List<String> testUsers = configService.getTestUsers(acceptData.getSystem());
         if (testUsers != null && testUsers.contains(uid+"")) {
            cloudOpen = true;
         }
@@ -1701,7 +1701,6 @@
    * @param uid
    * @param id
    * @param source
    * @param request
    * @param out
    */
   @RequestMapping(value = "getPDDLink")
@@ -1747,7 +1746,6 @@
    * @param uid
    * @param id
    * @param source
    * @param request
    * @param out
    */
   @RequestMapping(value = "getVIPLink")