admin
2020-02-27 dd9fd78aec975c29d6c5ea4c802aca2b7f773d91
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -415,6 +415,11 @@
         JSONArray array = JSONArray.fromObject(imgs);
         shareInfo.setNotifyPicture(array.optString(0));
         // 2.0.7版本后的提示图片
         imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
         array = JSONArray.fromObject(imgs);
         shareInfo.setNotifyPictureNew(array.optString(0));
         shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
         // 添加分享记录
@@ -560,11 +565,15 @@
               taoBaoLink.getGoods(), shareInfo.getToken()));
         // 提示图文内容
         String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), platform,
               Integer.parseInt(version));
         String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
         JSONArray array = JSONArray.fromObject(imgs);
         shareInfo.setNotifyPicture(array.optString(0));
         // 2.0.7版本后的提示图片
         imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
         array = JSONArray.fromObject(imgs);
         shareInfo.setNotifyPictureNew(array.optString(0));
         shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
@@ -587,13 +596,16 @@
         }
         // 设置评论文本选项
         shareInfo.setCommentTextChoiceList(getCommentChoiceList(shareInfo.getToken(), null, inviteCode,
         shareInfo.setCommentTextChoiceList(getCommentChoiceList(shareInfo.getShareText(), null, inviteCode,
               TaoBaoUtil.getGoodsHongBaoMoney(taoBaoLink.getGoods(), hongBaoManageService.getFanLiRate())));
         shareInfo.setCommentText(shareInfo.getShareText());
         if (VersionUtil.greaterThan_2_0_7(platform, version))
            shareInfo.setRecommendText(taoBaoLink.getGoods().getDescription());
         else
         if (VersionUtil.greaterThan_2_0_7(platform, version)) {
            String recommend = taoBaoLink.getGoods().getTitle();
            if (!StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getDescription()))
               recommend += "\n\r" + taoBaoLink.getGoods().getDescription();
            shareInfo.setRecommendText(recommend);
         } else
            shareInfo.setRecommendText(shareInfo.getDescText());
         out.print(JsonUtil.loadTrueResult(
@@ -711,6 +723,11 @@
      shareInfo.setNotifyPicture(array.size() > 1 ? array.optString(1) : array.optString(0));
      // 2.0.7版本后的提示图片
      imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
      array = JSONArray.fromObject(imgs);
      shareInfo.setNotifyPictureNew(array.size() > 1 ? array.optString(1) : array.optString(0));
      shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyJD.getKey()));
      // 添加分享记录
@@ -732,11 +749,14 @@
      String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
      // 设置评论文本选项
      shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getClickUrl(), inviteCode,
      shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getShareText(), inviteCode,
            JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getFanLiRate())));
      shareInfo.setCommentText(shareInfo.getShareText());
      shareInfo.setRecommendText(shareInfo.getDescText());
      if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion()))
         shareInfo.setRecommendText(jdGoods.getSkuName());
      else
         shareInfo.setRecommendText(shareInfo.getDescText());
      out.print(JsonUtil.loadTrueResult(
            JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
@@ -847,6 +867,11 @@
      shareInfo.setNotifyPicture(array.size() > 1 ? array.optString(1) : array.optString(0));
      // 2.0.7版本后的提示图片
      imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
      array = JSONArray.fromObject(imgs);
      shareInfo.setNotifyPictureNew(array.size() > 1 ? array.optString(1) : array.optString(0));
      shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
      // 添加分享记录
@@ -869,11 +894,14 @@
      String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
      // 设置评论文本选项
      shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getClickUrl(), inviteCode,
      shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getShareText(), inviteCode,
            PinDuoDuoUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate())));
      shareInfo.setCommentText(shareInfo.getShareText());
      shareInfo.setRecommendText(shareInfo.getDescText());
      if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion()))
         shareInfo.setRecommendText(goods.getGoodsName());
      else
         shareInfo.setRecommendText(shareInfo.getDescText());
      out.print(JsonUtil.loadTrueResult(
            JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));