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/lable/TaoKeGoodsServiceImpl.java | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/TaoKeGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/TaoKeGoodsServiceImpl.java index 4e2b0d0..6352897 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/TaoKeGoodsServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/TaoKeGoodsServiceImpl.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.yeshi.utils.JsonUtil; @@ -68,7 +69,7 @@ @Override @Cacheable(value = "taoKeMaterialCache", key = "'getBrandsGoods-'+#materialId +'-'+#pageIndex") - public JSONObject getBrandsGoods(Integer materialId, int pageIndex, int pageSize) throws Exception { + public JSONObject getBrandsGoods(Integer materialId, int pageIndex, int pageSize, SystemEnum system) throws Exception { TaoBaoSearchResult result = TaoKeApiUtil.getMaterialByMaterialId(materialId, pageIndex, pageSize); @@ -85,7 +86,7 @@ Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); - BigDecimal proportion = hongBaoManageService.getFanLiRate(); + BigDecimal proportion = hongBaoManageService.getFanLiRate(system); listGoods.parallelStream().forEach(taoBaoGoodsBrief -> { @@ -191,8 +192,8 @@ } @Override - @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiao-'+#sf") - public JSONObject searchWuLiao(SearchFilter sf) { + @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiao-'+#sf+'-'+system") + public JSONObject searchWuLiao(SearchFilter sf,SystemEnum system) { // 娣樺疂鐗╂枡鎺ュ彛鏌ヨ TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf); @@ -212,7 +213,7 @@ int fh = sf.getHongbao(); boolean ft = sf.isTmall(); - BigDecimal proportion = hongBaoManageService.getFanLiRate(); + BigDecimal proportion = hongBaoManageService.getFanLiRate(system); if (fq == 0 && fh == 0 && !ft) { if (result != null && result.getTaoBaoGoodsBriefs() != null) @@ -279,8 +280,8 @@ @Override - @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf+'-'+#platform+'-'+#version") - public JSONObject searchWuLiaoV2(SearchFilter sf,String platform,String version) { + @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf+'-'+#platform+'-'+#version+'-'+#system") + public JSONObject searchWuLiaoV2(SearchFilter sf,String platform,String version,SystemEnum system) { // 娣樺疂鐗╂枡鎺ュ彛鏌ヨ TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf); @@ -300,7 +301,7 @@ int fh = sf.getHongbao(); boolean ft = sf.isTmall(); - ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version); + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version,system); if (fq == 0 && fh == 0 && !ft) { if (result != null && result.getTaoBaoGoodsBriefs() != null) @@ -347,9 +348,8 @@ @Override - @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoList-'+#sf") - public List<TaoBaoGoodsBrief> searchWuLiaoList(SearchFilter sf) { - + @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoList-'+#sf+'-'+system") + public List<TaoBaoGoodsBrief> searchWuLiaoList(SearchFilter sf,SystemEnum system) { // 娣樺疂鐗╂枡鎺ュ彛鏌ヨ TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf); if (result == null) @@ -360,7 +360,7 @@ @Override public JSONObject listByWuLiao(int page, String key, String cateIds, String filterParams, String order, - String startprice, String endprice, String searchParam) { + String startprice, String endprice, String searchParam,SystemEnum system) { SearchFilter sf = new SearchFilter(); sf.setKey(key); @@ -488,7 +488,7 @@ int fh = sf.getHongbao(); boolean ft = sf.isTmall(); - BigDecimal proportion = hongBaoManageService.getFanLiRate(); + BigDecimal proportion = hongBaoManageService.getFanLiRate(system); if (fq == 0 && fh == 0 && !ft) { if (result != null && result.getTaoBaoGoodsBriefs() != null) @@ -636,13 +636,13 @@ @Override public JSONObject listQualityGoods(List<QualityFactory> listQuality, List<TaoBaoGoodsBrief> searchWuLiaoList, - Map<String, String> map) { + Map<String, String> map,SystemEnum system) { JSONArray array = new JSONArray(); Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); - BigDecimal proportion = hongBaoManageService.getFanLiRate(); + BigDecimal proportion = hongBaoManageService.getFanLiRate(system); /* 閬嶅巻鍒楄〃鏁版嵁 */ for (QualityFactory selectionGoods : listQuality) { -- Gitblit v1.8.0