From 554de444b87aab5f93cb1593a8095612cf9479a7 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期二, 09 六月 2020 17:34:30 +0800
Subject: [PATCH] 订单
---
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 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 b9308cb..5357911 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
@@ -16,6 +16,7 @@
import org.yeshi.utils.JsonUtil;
import com.yeshi.fanli.dao.mybatis.brand.BrandClassShopMapper;
+import com.yeshi.fanli.dto.ConfigParamsDTO;
import com.yeshi.fanli.entity.brand.BrandClass;
import com.yeshi.fanli.entity.brand.BrandClassShop;
import com.yeshi.fanli.entity.goods.CommonGoods;
@@ -29,8 +30,9 @@
import com.yeshi.fanli.service.inter.brand.TaoBaoShopHistoryService;
import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
-import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
+import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
+import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
import com.yeshi.fanli.util.Constant;
@@ -60,6 +62,9 @@
@Resource
private HongBaoManageService hongBaoManageService;
+
+ @Resource
+ private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
@Resource
private QualityGoodsService qualityGoodsService;
@@ -76,7 +81,7 @@
}
@Override
- @Transactional
+ @Transactional(rollbackFor=Exception.class)
public String saveShopInfo(Long cid, List<Long> list) throws BrandClassShopException {
if (list == null || list.size() == 0) {
throw new BrandClassShopException(1, "璇烽�夋嫨搴楅摵");
@@ -133,7 +138,7 @@
}
@Override
- @Transactional
+ @Transactional(rollbackFor=Exception.class)
public void changeShopInfo(MultipartFile file, Long id, Long cid, String shopName, Integer state, Integer top,
String key) throws BrandClassShopException {
@@ -368,8 +373,8 @@
}
@Override
- @Cacheable(value = "brandCache", key = "'listEffectiveCacheV2-'+#page+'-'+#cid")
- public JSONObject listEffectiveCacheV2(int page, Long cid) {
+ @Cacheable(value = "brandCache", key = "'listEffectiveCacheV2-'+#page+'-'+#cid+'-'+#platform+'-'+#version")
+ public JSONObject listEffectiveCacheV2(int page, Long cid,String platform,String version) {
long countShop = 0;
if (cid != null && cid <= 0) {
@@ -430,8 +435,7 @@
count = taoBaoShopService.countBrandShopinfo(cid);
}
- BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
- BigDecimal shareRate = hongBaoManageService.getShareRate();
+ ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version);
// 娣樺疂鍟嗗搧淇℃伅杩囨护
Map<Long, TaoBaoGoodsBrief> goodsMap = getFilterTaoBaoGoods(listInfo);
@@ -467,7 +471,7 @@
taoBaoGoodsUpdateService.addUpdateQueueAsync(listGoodsBrief);
for (TaoBaoGoodsBrief taoBaoGoodsBrief : listGoodsBrief) {
GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory
- .convertTaoBao(goodsMap.get(taoBaoGoodsBrief.getAuctionId()), null, fanLiRate, shareRate);
+ .convertTaoBao(goodsMap.get(taoBaoGoodsBrief.getAuctionId()),paramsDTO);
listGoods.add(goodsDetailVO);
}
taoBaoShopVO.setListGoodsVO(listGoods);
@@ -526,7 +530,7 @@
@Override
- public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid) {
+ public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid,String platform,String version) {
if (cid != null && cid <= 0) {
cid = null;
}
@@ -536,9 +540,8 @@
return listInfo;
- BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
- BigDecimal shareRate = hongBaoManageService.getShareRate();
-
+ ConfigParamsDTO paramsDTO =
+ orderHongBaoMoneyComputeService.getShowComputeRate(platform, version);
// 娣樺疂鍟嗗搧淇℃伅杩囨护
Map<Long, TaoBaoGoodsBrief> goodsMap = getFilterTaoBaoGoods(listInfo);
@@ -559,7 +562,7 @@
taoBaoGoodsUpdateService.addUpdateQueueAsync(listGoodsBrief);
for (TaoBaoGoodsBrief taoBaoGoodsBrief : listGoodsBrief) {
GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory
- .convertTaoBao(goodsMap.get(taoBaoGoodsBrief.getAuctionId()), null, fanLiRate, shareRate);
+ .convertTaoBao(goodsMap.get(taoBaoGoodsBrief.getAuctionId()), paramsDTO);
listGoods.add(goodsDetailVO);
}
taoBaoShopVO.setListGoodsVO(listGoods);
@@ -580,7 +583,7 @@
@Override
public List<TaoBaoShop> listEffectiveClassShop(Long cid) {
- if (cid == null && cid <= 0)
+ if (cid == null)
return null;
List<BrandClassShop> list = brandClassShopMapper.listEffective(cid);
--
Gitblit v1.8.0