From c9cbad5f5d18c6b2ac5a063e41007933d7028329 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 07 七月 2020 15:24:17 +0800 Subject: [PATCH] 返利配置文件加入系统区分 --- fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java index 5357911..eb9035a 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java @@ -9,6 +9,7 @@ import javax.annotation.Resource; +import com.yeshi.fanli.entity.SystemEnum; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -264,8 +265,8 @@ } @Override - @Cacheable(value = "brandCache", key = "'listEffectiveCache-'+#page+'-'+#cid") - public JSONObject listEffectiveCache(int page, Long cid) { + @Cacheable(value = "brandCache", key = "'listEffectiveCache-'+#page+'-'+#cid+'-'+#system") + public JSONObject listEffectiveCache(int page, Long cid,SystemEnum system) { long countShop = 0; if (cid != null && cid <= 0) { @@ -275,7 +276,7 @@ List<TaoBaoShop> listShop = new ArrayList<TaoBaoShop>(); // 绗竴椤� 鏌ヨ鍏ㄩ儴鍒嗙被涓嬪簵閾� if (page == 1 && cid != null) { - List<BrandClassShop> list = brandClassShopMapper.listEffective(cid); + List<BrandClassShop> list = brandClassShopMapper.listEffective(cid,system); if (list == null) { list = new ArrayList<BrandClassShop>(); } else if (list.size() > 0) { @@ -321,7 +322,7 @@ // 娣樺疂鍟嗗搧淇℃伅杩囨护 Map<Long, TaoBaoGoodsBrief> goodsMap = getFilterTaoBaoGoods(listInfo); - BigDecimal proportion = hongBaoManageService.getFanLiRate(); + BigDecimal proportion = hongBaoManageService.getFanLiRate(system); for (TaoBaoShopVO taoBaoShopVO : listInfo) { String shopLink = taoBaoShopVO.getShopLink(); @@ -373,8 +374,8 @@ } @Override - @Cacheable(value = "brandCache", key = "'listEffectiveCacheV2-'+#page+'-'+#cid+'-'+#platform+'-'+#version") - public JSONObject listEffectiveCacheV2(int page, Long cid,String platform,String version) { + @Cacheable(value = "brandCache", key = "'listEffectiveCacheV2-'+#page+'-'+#cid+'-'+#platform+'-'+#version+'-'+#system") + public JSONObject listEffectiveCacheV2(int page, Long cid,String platform,String version,SystemEnum system) { long countShop = 0; if (cid != null && cid <= 0) { @@ -384,7 +385,7 @@ List<TaoBaoShop> listShop = new ArrayList<TaoBaoShop>(); // 绗竴椤� 鏌ヨ鍏ㄩ儴鍒嗙被涓嬪簵閾� if (page == 1 && cid != null) { - List<BrandClassShop> list = brandClassShopMapper.listEffective(cid); + List<BrandClassShop> list = brandClassShopMapper.listEffective(cid,system); if (list == null) { list = new ArrayList<BrandClassShop>(); } else if (list.size() > 0) { @@ -435,7 +436,7 @@ count = taoBaoShopService.countBrandShopinfo(cid); } - ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version); + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version,system); // 娣樺疂鍟嗗搧淇℃伅杩囨护 Map<Long, TaoBaoGoodsBrief> goodsMap = getFilterTaoBaoGoods(listInfo); @@ -530,7 +531,7 @@ @Override - public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid,String platform,String version) { + public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid,String platform,String version,SystemEnum system) { if (cid != null && cid <= 0) { cid = null; } @@ -541,7 +542,7 @@ ConfigParamsDTO paramsDTO = - orderHongBaoMoneyComputeService.getShowComputeRate(platform, version); + orderHongBaoMoneyComputeService.getShowComputeRate(platform, version,system); // 娣樺疂鍟嗗搧淇℃伅杩囨护 Map<Long, TaoBaoGoodsBrief> goodsMap = getFilterTaoBaoGoods(listInfo); @@ -582,11 +583,11 @@ @Override - public List<TaoBaoShop> listEffectiveClassShop(Long cid) { + public List<TaoBaoShop> listEffectiveClassShop(Long cid, SystemEnum system) { if (cid == null) return null; - List<BrandClassShop> list = brandClassShopMapper.listEffective(cid); + List<BrandClassShop> list = brandClassShopMapper.listEffective(cid,system); if (list == null || list.size() == 0) return null; -- Gitblit v1.8.0