From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 23 五月 2020 09:54:38 +0800 Subject: [PATCH] 足迹、收藏订单兼容新需求 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java index 535c4a2..f14d402 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java @@ -2,7 +2,6 @@ import java.io.PrintWriter; import java.lang.reflect.Type; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -35,7 +34,7 @@ import com.yeshi.fanli.service.inter.config.BusinessSystemService; import com.yeshi.fanli.service.inter.goods.CollectionGoodsV2Service; import com.yeshi.fanli.service.inter.goods.ScanHistoryV2Service; -import com.yeshi.fanli.service.inter.order.config.HongBaoManageService; +import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.RedisManager; import com.yeshi.fanli.util.StringUtil; @@ -65,7 +64,7 @@ private BusinessSystemService businessSystemService; @Resource - private HongBaoManageService hongBaoManageService; + private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService; @Resource private CollectionGoodsV2Service collectionGoodsV2Service; @@ -205,10 +204,14 @@ return; } + boolean notBackSuVip = false; + if (!VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) + notBackSuVip = true; + List<CollectionGoodsV2> collectionGoodsList = collectionGoodsV2Service.getCollectionGoodsList(uid, page, - Constant.PAGE_SIZE, goodsType); + Constant.PAGE_SIZE, goodsType, notBackSuVip); - long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, goodsType); + long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, goodsType, notBackSuVip); JSONObject data = new JSONObject(); List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>(); @@ -237,9 +240,8 @@ } } - ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()); - for (CollectionGoodsV2 collectionGoodsV2 : collectionGoodsList) { CommonGoods commonGoods = collectionGoodsV2.getCommonGoods(); @@ -332,8 +334,13 @@ return; } + boolean notBackSuVip = false; + if (!VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) + notBackSuVip = true; + + List<ScanHistoryV2> list = scanHistoryV2Service.getScanHistoryByDeviceOrUid(uid, acceptData.getDevice(), page, - 20, goodsType); + 20, goodsType, notBackSuVip); GsonBuilder gsonBuilder = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()); gsonBuilder.excludeFieldsWithoutExposeAnnotation(); @@ -348,12 +355,12 @@ } }); - long count = scanHistoryV2Service.getCountByDeviceOrUid(uid, acceptData.getDevice(), goodsType); + long count = scanHistoryV2Service.getCountByDeviceOrUid(uid, acceptData.getDevice(), goodsType, notBackSuVip); JSONArray array = new JSONArray(); if (list != null && list.size() > 0) { Gson gson = gsonBuilder.create(); - ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()); for (ScanHistoryV2 sh : list) { CommonGoods commonGoods = sh.getCommonGoods(); -- Gitblit v1.8.0