From e7920b14a9baab97035a1a529da85d124a2bcacd Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期二, 16 六月 2020 10:54:29 +0800
Subject: [PATCH] 云发单对测试用户显示

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserGoodsStorageServiceImpl.java |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserGoodsStorageServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserGoodsStorageServiceImpl.java
index 7619f25..5d0d662 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserGoodsStorageServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserGoodsStorageServiceImpl.java
@@ -20,8 +20,10 @@
 import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
 import com.yeshi.fanli.dto.share.ShareGoodsRecordDTO;
 import com.yeshi.fanli.entity.bus.user.UserGoodsStorage;
+import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
 import com.yeshi.fanli.entity.goods.CommonGoods;
 import com.yeshi.fanli.entity.jd.JDGoods;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
 import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
 import com.yeshi.fanli.exception.goods.CommonGoodsException;
 import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
@@ -289,7 +291,7 @@
 			}
 		}
 
-		BigDecimal rate = manageService.getFanLiRate();
+		BigDecimal rate = manageService.getFanLiRate(UserLevelEnum.daRen);
 		Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
 				.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
@@ -372,13 +374,13 @@
 		BigDecimal totalMoney = new BigDecimal(0.00);
 		List<TaoBaoGoodsBrief> listGoodsBrief = new ArrayList<TaoBaoGoodsBrief>();
 
-		BigDecimal rate = hongBaoManageService.getShareRate();
+		BigDecimal rate = hongBaoManageService.getShareRate(UserLevelEnum.daRen);
 		for (UserGoodsStorage userGoodsStorage : listResult) {
 			CommonGoods commonGoods = userGoodsStorage.getCommonGoods();
 			TaoBaoGoodsBrief goodsBrief = TaoBaoUtil.convert(commonGoods);
 			listGoodsBrief.add(goodsBrief);
 
-			BigDecimal money = TaoBaoUtil.getGoodsHongBaoMoney(goodsBrief, rate);
+			BigDecimal money = TaoBaoUtil.getGoodsHongBaoMoney(goodsBrief, rate,true);
 			totalMoney = MoneyBigDecimalUtil.add(totalMoney, money);
 		}
 
@@ -391,7 +393,7 @@
 		data.put("revenue", listGoodsBrief.size() + "涓晢鍝侀浼板垎浜閲戯細楼" + totalMoney);
 		data.put("shareId", shareRecord.getRedisKey());
 		data.put("shareImg", uploadResult);
-		data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
+		data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
 		return data;
 	}
 
@@ -419,7 +421,7 @@
 		List<CommonGoods> listCommonGoods = new ArrayList<CommonGoods>();
 
 		Integer goodsType = null;
-		BigDecimal rate = hongBaoManageService.getShareRate();
+		BigDecimal rate = hongBaoManageService.getShareRate(UserLevelEnum.daRen);
 		for (UserGoodsStorage userGoodsStorage : listResult) {
 			CommonGoods commonGoods = userGoodsStorage.getCommonGoods();
 			BigDecimal money = CommonGoodsUtil.getCommission(commonGoods, rate);
@@ -444,12 +446,12 @@
 		// 鎻愮ず璇笉鍚�
 		if (goodsType == Constant.SOURCE_TYPE_JD) {
 			// 浜笢
-			data.put("notifyDesc", configService.get("goods_share_notify_jd"));
+			data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyJD.getKey()));
 		} else if (goodsType == Constant.SOURCE_TYPE_PDD) {
 			// 鎷煎澶�
-			data.put("notifyDesc", configService.get("goods_share_notify_pdd"));
+			data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
 		} else {
-			data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
+			data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
 		}
 		return data;
 	}

--
Gitblit v1.8.0