From 8dc8133fb93405c6fc34c9c3c6c6bbce09ebe7f0 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 24 十二月 2019 10:52:52 +0800
Subject: [PATCH] 品牌商品更新调整 订单维权修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java |   56 +++++++++++++++++++++++---------------------------------
 1 files changed, 23 insertions(+), 33 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
index b92e409..aae72e0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -340,11 +340,11 @@
 		for (String img : tb.getImgList()) {
 			finalImgList.add(TbImgUtil.getTBSizeImg(img, 600));
 		}
-		
+
 		if (finalImgList.size() == 0) {
 			finalImgList.add(tb.getPictUrl());
 		}
-		
+
 		if (!StringUtil.isNullOrEmpty(tb.getPictUrlWhite()))
 			finalImgList.add(0, tb.getPictUrlWhite());
 
@@ -367,10 +367,9 @@
 			LogHelper.errorDetailInfo(e);
 		}
 
-		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-		BigDecimal shareRate = hongBaoManageService.getShareRate();
-		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
-				hongBaoManageService.getVIPFanLiRate());
+		ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+				acceptData.getVersion());
+
 		GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
 		if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
 			goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -537,8 +536,7 @@
 				params1.put("url", configService.get("special_guide_reward_coupon_link"));
 			else
 				params1.put("url", configService.get("vip_link"));
-			rewardCoupon
-					.setMaxMoney("楼" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPFanLiRate()));
+			rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
 			if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
 				rewardCoupon.setDesc("杩�");
 				params1.put("url", configService.get("vip_link"));
@@ -624,10 +622,8 @@
 		// 淇濆瓨缂撳瓨
 		jdGoodsCacheUtil.saveGoodsInfo(jdGoods);
 
-		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-		BigDecimal shareRate = hongBaoManageService.getShareRate();
-		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
-				hongBaoManageService.getVIPFanLiRate());
+		ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+				acceptData.getVersion());
 		GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, paramsDTO);
 		if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
 			goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -651,12 +647,14 @@
 				if (commissionShare != null && commissionShare.compareTo(threeClass.getSelfComm()) > 0) {
 					jdGoods.setCommissionPlus(threeClass.getSelfComm());
 					// plus杩斿埄
-					BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods, fanLiRate);
+					BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
+							hongBaoManageService.getFanLiRate());
 					otherInfo.setFanliMoneyPlus("浜笢plus杩斅�" + fanliMoneyPlus);
 					// 浣跨敤濂栧姳鍒告渶楂樿繑
 					if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
 						maxMoneyPlus = "锛堜含涓減lus杩斅�"
-								+ fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
+								+ JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
+										hongBaoManageService.getVIPFanLiRate())
 								+ "锛�";
 					} else
 						maxMoneyPlus = "锛堜含涓減lus鏈�楂樿繑楼"
@@ -676,7 +674,7 @@
 		else
 			params1.put("url", configService.get("vip_link"));
 
-		rewardCoupon.setMaxMoney("楼" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPFanLiRate()));
+		rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
 		if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
 			rewardCoupon.setDesc("杩�");
 			params1.put("url", configService.get("vip_link"));
@@ -820,10 +818,8 @@
 			return;
 		}
 
-		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-		BigDecimal shareRate = hongBaoManageService.getShareRate();
-		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
-				hongBaoManageService.getVIPFanLiRate());
+		ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+				acceptData.getVersion());
 		GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, paramsDTO);
 		if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
 			goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -841,8 +837,7 @@
 		else
 			params1.put("url", configService.get("vip_link"));
 
-		rewardCoupon
-				.setMaxMoney("楼" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPFanLiRate()));
+		rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
 		if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
 			rewardCoupon.setDesc("杩�");
 			params1.put("url", configService.get("vip_link"));
@@ -994,10 +989,8 @@
 					list = list.subList(0, 10);
 				}
 
-				BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-				BigDecimal shareRate = hongBaoManageService.getShareRate();
-				ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
-						hongBaoManageService.getVIPFanLiRate());
+				ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+						acceptData.getVersion());
 				List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>();
 
 				for (JDGoods goods : list) {
@@ -1038,10 +1031,8 @@
 								goodsList = goodsList.subList(0, 10);
 							}
 
-							BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-							BigDecimal shareRate = hongBaoManageService.getShareRate();
-							ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate,
-									Constant.MAX_REWARD_RATE, hongBaoManageService.getVIPFanLiRate());
+							ConfigParamsDTO paramsDTO = hongBaoManageService
+									.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
 							for (PDDGoodsDetail goods : goodsList) {
 								listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO));
 							}
@@ -1084,10 +1075,8 @@
 
 			if (goodsList != null && goodsList.size() > 0) {
 
-				BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-				BigDecimal shareRate = hongBaoManageService.getShareRate();
-				ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
-						hongBaoManageService.getVIPFanLiRate());
+				ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+						acceptData.getVersion());
 
 				goodsList.parallelStream().forEach(goods -> {
 					if (goods != null) {
@@ -1365,6 +1354,7 @@
 
 		ConfigParamsDTO params = new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
 				hongBaoManageService.getShareRate(), new BigDecimal(80), hongBaoManageService.getVIPFanLiRate());
+		hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
 
 		if (tbGoodsList.size() > 0) {
 			List<TaoBaoGoodsBrief> goodsList = null;

--
Gitblit v1.8.0