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/goods/CommonTemplateContentServiceImpl.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java index f016c1f..32d7e90 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.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; @@ -142,9 +143,9 @@ return navList; } - @Cacheable(value = "commonContentCache", key = "#type+'-'+#cid+'-'+#page+'-'+#pageSize") + @Cacheable(value = "commonContentCache", key = "#type+'-'+#cid+'-'+#page+'-'+#pageSize+'-'+#system") @Override - public CommonContentResult getContentList(CommonContentTypeEnum type, String cid, int page, int pageSize) { + public CommonContentResult getContentList(CommonContentTypeEnum type, String cid, int page, int pageSize, SystemEnum system) { CommonContentResult result = null; if (type == CommonContentTypeEnum._9k9) { result = get9K9Content(cid, page, pageSize); @@ -171,7 +172,7 @@ } else if (type == CommonContentTypeEnum.chaoPinReMai) { result = getChaoPinReMaiContent(cid, page, pageSize); } else if (type == CommonContentTypeEnum.chaoSheng) { - result = getCaoShengContent(cid, page, pageSize); + result = getCaoShengContent(cid, page, pageSize,system); } else if (type == CommonContentTypeEnum.haoQuan) { result = getHaoQuanContent(cid, page, pageSize); } else if (type == CommonContentTypeEnum.mianDan) { @@ -254,7 +255,7 @@ * @param pageSize * @return */ - private CommonContentResult getCaoShengContent(String cid, int page, int pageSize) { + private CommonContentResult getCaoShengContent(String cid, int page, int pageSize, SystemEnum system) { pageSize = Constant.PAGE_SIZE; Integer startAmount = null; Integer endAmount = null; @@ -278,7 +279,7 @@ double tkRate = 20.00; - BigDecimal proportion = hongBaoManageService.getFanLiRate(); + BigDecimal proportion = hongBaoManageService.getFanLiRate(system); List<QualityFactory> listQuery = qualityGoodsService.listQueryByRebateAmount((page - 1) * pageSize, pageSize, proportion.toString(), startAmount, endAmount, tkRate); -- Gitblit v1.8.0