yujian
2019-12-28 c3f10da9aa6f4d8fecccc1c9574567ee0766ab48
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -360,14 +360,12 @@
            commonGoods = CommonGoodsFactory.create(goodsBrief);
         }
         BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
         BigDecimal shareRate = hongBaoManageService.getShareRate();
         Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
               .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
         data.put("type", type);
         data.put("goods",
               gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods, new ConfigParamsDTO(fanLiRate,
                     shareRate, Constant.MAX_REWARD_RATE, hongBaoManageService.getVIPFanLiRate()))));
               gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods,hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                     acceptData.getVersion()))));
         out.print(JsonUtil.loadTrueResult(data));
         return;
      }
@@ -483,8 +481,6 @@
                     return false;
                  }
                  BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                  BigDecimal shareRate = hongBaoManageService.getShareRate();
                  Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                        .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
@@ -492,8 +488,8 @@
                  data.put("type", 3);
                  data.put("goods",
                        gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief,
                              new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                                    hongBaoManageService.getVIPFanLiRate()))));
                              hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                                    acceptData.getVersion()))));
                  out.print(JsonUtil.loadTrueResult(data));
                  return true;
               }
@@ -763,10 +759,8 @@
      }
      List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>();
      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());
      for (TaoBaoGoodsBrief goods : taoBaoGoodsBriefs) {
         list.add(GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO));
@@ -786,13 +780,13 @@
               || ("android".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_2(platform, version))) {
            BrandInfoVO brandInfoVO = null;
            try {
               brandInfoVO = brandInfoService.listByAlikeName(key);
               brandInfoVO = brandInfoService.listByAlikeName(key,acceptData.getPlatform(),acceptData.getVersion());
            } catch (Exception e) {
            }
            if (brandInfoVO != null)
               data.put("shop", JsonUtil.getApiCommonGson().toJson(brandInfoVO));
         } else {
            List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKeyV2(key);
            List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKeyV2(key,acceptData.getPlatform(),acceptData.getVersion());
            if (listShop != null && listShop.size() > 0 && listShop.get(0).getListGoodsVO() != null
                  && listShop.get(0).getListGoodsVO().size() > 2) {
               TaoBaoShopVO taoBaoShop = listShop.get(0);
@@ -969,13 +963,10 @@
         List<JDGoods> goodsList = result.getGoodsList();
         if (goodsList != null && goodsList.size() > 0) {
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                  .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                  hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                  acceptData.getVersion());
            for (JDGoods goods : goodsList) {
               GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO);
               if (hasCoupon) {
@@ -1056,10 +1047,8 @@
         Gson gson = JsonUtil.getApiCommonGson();
         List<PDDGoodsDetail> goodsList = result.getGoodsList();
         if (goodsList != null && goodsList.size() > 0) {
            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());
            for (PDDGoodsDetail goods : goodsList) {
               GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO);