From 84dd8c1579ea198aff6ca8afac05a5e8f6af9faf Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 21 五月 2021 10:46:22 +0800 Subject: [PATCH] 淘礼金功能完善 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java | 29 ++++++++++------------------- 1 files changed, 10 insertions(+), 19 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 2cc1748..69dffdf 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 @@ -15,6 +15,7 @@ import com.yeshi.fanli.entity.SystemEnum; import com.yeshi.fanli.entity.SystemFunction; import com.yeshi.fanli.exception.pdd.PDDApiException; +import com.yeshi.fanli.lijin.manager.GoodsLijinMnager; import com.yeshi.fanli.service.inter.pdd.PDDAuthService; import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService; import com.yeshi.fanli.util.*; @@ -216,6 +217,9 @@ @Resource private PDDAuthService pddAuthService; + + @Resource + private GoodsLijinMnager goodsLijinMnager; private GoodsMoneyConfigParamsDTO getParamsDTO(String platform, String version, Long uid, SystemEnum system) { UserLevelEnum level = UserLevelEnum.daRen; @@ -1482,7 +1486,7 @@ * @param out */ @RequestMapping(value = "getRecommendGoods", method = RequestMethod.POST) - public void getRecommendGoods(AcceptData acceptData, String id, Integer goodsType, PrintWriter out) { + public void getRecommendGoods(AcceptData acceptData, String id, Long uid, Integer goodsType, PrintWriter out) { if (goodsType == null) { goodsType = Constant.SOURCE_TYPE_TAOBAO; } @@ -1501,11 +1505,7 @@ } GoodsMoneyConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null, acceptData.getSystem()); - List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>(); - - for (JDGoods goods : list) { - listDetailVO.add(GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO)); - } + List<GoodsDetailVO> listDetailVO = goodsLijinMnager.loadOtherMoneyInfo(acceptData.getSystem(), uid, list, paramsDTO); //new ArrayList<GoodsDetailVO>(); // 鍙栧伓鏁颁釜鏁版嵁 if (listDetailVO.size() % 2 != 0) { @@ -1543,9 +1543,7 @@ GoodsMoneyConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null, acceptData.getSystem()); - for (PDDGoodsDetail goods : goodsList) { - listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO)); - } + listDetailVO = goodsLijinMnager.loadOtherMoneyInfo(acceptData.getSystem(), uid, goodsList, paramsDTO); } } } @@ -1589,11 +1587,7 @@ if (resultList != null && resultList.size() > 0) { GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion(), acceptData.getSystem()); - - for (SuningGoodsInfo goods : resultList) { - GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertSuningGoods(goods, paramsDTO); - listDetailVO.add(goodsDetailVO); - } + listDetailVO = goodsLijinMnager.loadOtherMoneyInfo(acceptData.getSystem(), uid, resultList, paramsDTO); } } @@ -1612,11 +1606,8 @@ List<GoodsDetailVO> listExtra = new ArrayList<GoodsDetailVO>(); GoodsMoneyConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null, acceptData.getSystem()); - goodsList.parallelStream().forEach(goods -> { - if (goods != null) { - listExtra.add(GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO)); - } - }); + + listExtra = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsList, paramsDTO); List<GoodsDetailVO> listQuality = new ArrayList<GoodsDetailVO>(); // 鍙栧伓鏁颁釜鏁版嵁 -- Gitblit v1.8.0