From 221b5c8d0de3f6b17a00d543503a79c13b28ba12 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 13 十一月 2019 16:45:57 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java index 2e42b9b..89b75a2 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java @@ -16,6 +16,7 @@ import org.yeshi.utils.JsonUtil; import org.yeshi.utils.taobao.TbImgUtil; +import com.yeshi.fanli.dto.ConfigParamsDTO; import com.yeshi.fanli.dto.jd.JDCategoryInfo; import com.yeshi.fanli.dto.jd.JDCouponInfo; import com.yeshi.fanli.dto.pdd.PDDGoodsDetail; @@ -265,7 +266,6 @@ taoBaoGoodsUpdateService.offlineTaoBaoGoods(id); } }); - } } else { @@ -349,7 +349,8 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); - GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, null, fanLiRate, shareRate); + ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE); + GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO); if (TaoBaoUtil.isYUShou(goods)) { if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) { @@ -640,7 +641,8 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); - GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, fanLiRate, shareRate); + ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE); + GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, paramsDTO); // 闄勫姞淇℃伅 OtherInfo otherInfo = new OtherInfo(); @@ -814,7 +816,8 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); - GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, fanLiRate, shareRate); + ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE); + GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, paramsDTO); // 闄勫姞淇℃伅 OtherInfo otherInfo = new OtherInfo(); @@ -972,10 +975,11 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); + ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE); List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>(); for (JDGoods goods : list) { - listDetailVO.add(GoodsDetailVOFactory.convertJDGoods(goods, fanLiRate, shareRate)); + listDetailVO.add(GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO)); } // 鍙栧伓鏁颁釜鏁版嵁 @@ -1014,8 +1018,9 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); + ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE); for (PDDGoodsDetail goods : goodsList) { - listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, fanLiRate, shareRate)); + listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO)); } } } @@ -1058,7 +1063,8 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); - + ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE); + goodsList.parallelStream().forEach(goods -> { if (goods != null) { // 鑾峰彇璇︽儏 @@ -1079,7 +1085,7 @@ if (taoBaoGoodsBrief != null) { listExtra.add( - GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate, shareRate)); + GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO)); } } }); -- Gitblit v1.8.0