yujian
2020-01-03 c9cbdfa41d645d42eeaa7e06d550d4ef8ac328e7
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -273,9 +273,9 @@
         TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(uid, goodsId, relationId);
         if (taoBaoLink != null && taoBaoLink.getGoods() != null && needGoods) {
            ConfigParamsDTO dto = new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
                  hongBaoManageService.getShareRate(), Constant.MAX_REWARD_RATE,
                  hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO dto = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                  acceptData.getVersion());
            GoodsDetailVO goodsInfo = GoodsDetailVOFactory.convertTaoBao(taoBaoLink.getGoods(), dto);
            shareInfo.setGoodsInfo(goodsInfo);
         }
@@ -352,9 +352,11 @@
         // 测试
         // 2.0.2之前
         if (!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
            shareInfo.setClickUrl(getERCodeContent(configService.get("taobao_share_qrcode_text"), taoBaoLink.getGoods(), shareInfo.getToken()));
            shareInfo.setClickUrl(getERCodeContent(configService.get("taobao_share_qrcode_text"),
                  taoBaoLink.getGoods(), shareInfo.getToken()));
         shareInfo.setWxErCode(getERCodeContent(configService.get("taobao_share_qrcode_text"), taoBaoLink.getGoods(), shareInfo.getToken()));
         shareInfo.setWxErCode(getERCodeContent(configService.get("taobao_share_qrcode_text"), taoBaoLink.getGoods(),
               shareInfo.getToken()));
         // 提示图文内容
         String imgs = configService.get("goods_share_notify_imgs");
@@ -383,7 +385,8 @@
            }
         }
         out.print(JsonUtil.loadTrueResult(JsonUtil.getSimpleGson().toJson(shareInfo)));
         out.print(JsonUtil.loadTrueResult(
               JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
         final TaoBaoLink taobaoLink = taoBaoLink;
         // 异步操作
@@ -401,7 +404,7 @@
               history.setQuanLink(taobaoLink.getCouponLink());
               history.setGoodsId(taobaoLink.getGoods().getAuctionId());
               history.setPostPicture(taobaoLink.getGoods().getPictUrl());
               history.setShareImg(taobaoLink.getClickUrl());
               List<String> imgList = taobaoLink.getGoods().getImgList();
               if (imgList == null) {
                  imgList = new ArrayList<>();
@@ -582,7 +585,7 @@
               history.setQuanLink(taobaoLink.getCouponLink());
               history.setGoodsId(finalGoods.getAuctionId());
               history.setPostPicture(finalGoods.getPictUrl());
               history.setShareImg(taobaoLink.getClickUrl());
               List<String> imgList = finalGoods.getImgList();
               if (imgList == null) {
                  imgList = new ArrayList<>();
@@ -641,11 +644,8 @@
      shareInfo.setCommentTexts(new ArrayList<>());
      if (needGoods)
         shareInfo
               .setGoodsInfo(GoodsDetailVOFactory.convertJDGoods(jdGoods,
                     new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
                           hongBaoManageService.getShareRate(), Constant.MAX_REWARD_RATE,
                           hongBaoManageService.getVIPFanLiRate())));
         shareInfo.setGoodsInfo(GoodsDetailVOFactory.convertJDGoods(jdGoods,
               hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion())));
      String shareText = "";
      boolean hasCoupon = false;
@@ -699,7 +699,8 @@
            e1.printStackTrace();
         }
      }
      out.print(JsonUtil.loadTrueResult(JsonUtil.getSimpleGson().toJson(shareInfo)));
      out.print(JsonUtil.loadTrueResult(
            JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
      // 异步操作
      final JDGoods goods = jdGoods;
@@ -717,7 +718,8 @@
            history.setQuanLink(null);
            history.setGoodsId(goodsId);
            history.setPostPicture(goods.getPicUrl());
            history.setShareImg(jumpLink);
            List<String> imgList = goods.getImageList();
            if (imgList == null) {
               imgList = new ArrayList<>();
@@ -824,7 +826,8 @@
            e1.printStackTrace();
         }
      }
      out.print(JsonUtil.loadTrueResult(JsonUtil.getSimpleGson().toJson(shareInfo)));
      out.print(JsonUtil.loadTrueResult(
            JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
      // 异步操作
      com.yeshi.fanli.util.ThreadUtil.run(new Runnable() {
@@ -841,7 +844,7 @@
            history.setQuanLink(null);
            history.setGoodsId(goodsId);
            history.setPostPicture(goods.getGoodsImageUrl());
            history.setShareImg(jumpLink);
            List<String> imgList = null;
            String[] goodsGalleryUrls = goods.getGoodsGalleryUrls();
            if (goodsGalleryUrls != null) {
@@ -1413,10 +1416,8 @@
         }
      }
      BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
      BigDecimal shareRate = hongBaoManageService.getShareRate();
      ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
            hongBaoManageService.getVIPFanLiRate());
      ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
            acceptData.getVersion());
      Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
            .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();