From f4a0f2acc63d7785eab108419a4e16f5f688cb95 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 18 一月 2020 12:06:27 +0800
Subject: [PATCH] 用户注册信息

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java |  198 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 132 insertions(+), 66 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 5bb3509..92f3bb6 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
@@ -33,6 +33,7 @@
 import com.yeshi.fanli.entity.jd.JDGoods;
 import com.yeshi.fanli.entity.jd.JDGoodsClass;
 import com.yeshi.fanli.entity.system.BusinessSystem;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
 import com.yeshi.fanli.entity.system.SystemClientParams;
 import com.yeshi.fanli.entity.taobao.ClientTBPid;
 import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
@@ -61,7 +62,7 @@
 import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
-import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
+import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
 import com.yeshi.fanli.service.inter.tlj.ConfigTaoLiJinService;
 import com.yeshi.fanli.service.inter.user.ShamUserService;
 import com.yeshi.fanli.service.inter.user.TBPidService;
@@ -69,6 +70,8 @@
 import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
 import com.yeshi.fanli.service.inter.user.UserInfoService;
 import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
+import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
+import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.MoneyBigDecimalUtil;
 import com.yeshi.fanli.util.RedisManager;
@@ -140,7 +143,7 @@
 	private TaoBaoUnionConfigService taoBaoUnionConfigService;
 
 	@Resource
-	private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
+	private DaTaoKeGoodsDetailV2Service daTaoKeGoodsDetailV2Service;
 
 	@Resource
 	private HongBaoManageService hongBaoManageService;
@@ -183,12 +186,18 @@
 
 	@Resource
 	private JDGoodsClassService jdGoodsClassService;
-	
+
 	@Resource
 	private TLJFreeBuyGoodsService tljFreeBuyGoodsService;
-	
+
 	@Resource
 	private UserTaoLiJinNewbiesService userTaoLiJinNewbiesService;
+
+	@Resource
+	private UserVIPInfoService userVIPInfoService;
+
+	@Resource
+	private UserVipConfigService userVipConfigService;
 
 	/**
 	 * 娣樺疂鍟嗗搧璇︽儏
@@ -236,7 +245,7 @@
 
 		LogHelper.test("鑾峰彇PID鑰楁椂锛�" + (java.lang.System.currentTimeMillis() - startTime));
 
-		final List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
+		// final List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
 		// 鏄惁鍦ㄦ湇鍔$杩涜杞摼
 		boolean convertInServer = configService.isConvertTaoBaoLinkInServer();
 
@@ -305,7 +314,6 @@
 		}
 
 		if (goods != null) {
-			goodsList.add(goods);
 			final TaoBaoGoodsBrief newGoods = goods;
 			ThreadUtil.run(new Runnable() {
 				public void run() {
@@ -320,10 +328,7 @@
 			});
 		}
 
-		TaoBaoGoodsBrief tb = null;
-		if (goodsList.size() > 0) {
-			tb = goodsList.get(0);
-		}
+		TaoBaoGoodsBrief tb = goods;
 
 		if (tb == null) {
 			out.print(JsonUtil.loadFalseResult(2, "鍟嗗搧涓嶅瓨鍦�"));
@@ -334,26 +339,51 @@
 			tb.setImgList(new ArrayList<>());
 		}
 
-		tb.getImgList().add(0, tb.getPictUrl());
+		// tb.getImgList().add(0, tb.getPictUrl());
 
 		List<String> finalImgList = new ArrayList<>();
 		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());
 
+		// 绉婚櫎鐩稿悓鍥剧墖
+		if (finalImgList.size() > 0)
+			for (int i = 0; i < finalImgList.size(); i++) {
+				if (i < finalImgList.size() - 1)
+					if (TbImgUtil.getTBSizeImg(finalImgList.get(i), 600)
+							.equalsIgnoreCase(TbImgUtil.getTBSizeImg(finalImgList.get(i + 1), 600))) {
+						finalImgList.remove(i--);
+					}
+			}
+
+		tb.setImgList(finalImgList);
+
 		// 澶ф窐瀹㈠晢鍝佽繃婊�
 		try {
-			goods = daTaoKeGoodsDetailService.filterTaoBaoGoods(goods);
+			goods = daTaoKeGoodsDetailV2Service.filterTaoBaoGoods(goods);
 		} catch (Exception e) {
 			LogHelper.errorDetailInfo(e);
 		}
 
-		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-		BigDecimal shareRate = hongBaoManageService.getShareRate();
-		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
+		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());
+			goodsDetail.getMoneyInfo().setShareMoney(
+					"楼" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPShareRate()));
+			goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
+		}
+		goodsDetail.getMoneyInfo()
+				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
 
 		if (TaoBaoUtil.isYUShou(goods)) {
 			if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
@@ -386,7 +416,7 @@
 		}
 
 		extraVO.setTbPidInfo(clientTBPid);
-		extraVO.setDetailUrl("http://apph5.yeshitv.com/apppage/goods_img.html?id=" + id);
+		extraVO.setDetailUrl("http://apph5.banliapp.com/apppage/goods_img.html?id=" + id);
 
 		// 鍒嗕韩璧氫汉鎻愮ず
 		MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
@@ -433,7 +463,7 @@
 		} catch (Exception e) {
 			extraVO.setH5Url(h5Url);
 		}
-		
+
 		String helpLink = null;
 		boolean fanliValid = true;
 		boolean shareValid = true;
@@ -451,7 +481,7 @@
 			moneyType = 2;
 			fanliValid = true;
 			shareValid = false;
-			helpLink = configService.get("zigoulijian_nofanli_help");
+			helpLink = configService.get(ConfigKeyEnum.zigoulijianNofanliHelp.getKey());
 
 			BigDecimal tljHongBao = TaoBaoUtil.getGoodsHongBaoMoney(goods, TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE);
 
@@ -475,7 +505,8 @@
 					goodsDetail.setZkPrice(goodsDetail.getZkPrice().subtract(tljHongBao));
 			}
 		} else if (from != null && from.equals("taolijin_free_buy")) {
-			TLJFreeBuyGoods freeGoods = tljFreeBuyGoodsService.selectByAuctionIdAndDay(id, TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
+			TLJFreeBuyGoods freeGoods = tljFreeBuyGoodsService.selectByAuctionIdAndDay(id,
+					TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
 			if (freeGoods == null) {
 				out.print(JsonUtil.loadFalseResult(2, "鍏嶅崟鍟嗗搧宸蹭笅鏋�"));
 				return;
@@ -484,9 +515,9 @@
 			fanliValid = true;
 			shareValid = false;
 			BigDecimal couponPrice = goodsDetail.getCouponPrice();
-			if (couponPrice == null) 
+			if (couponPrice == null)
 				couponPrice = goodsDetail.getZkPrice();
-			
+
 			NewUserHongBao newUserHongBao = new NewUserHongBao();
 			newUserHongBao.setMoney(couponPrice.setScale(2).toString());
 			newUserHongBao.setName("鏂颁汉绾㈠寘 ");
@@ -497,24 +528,36 @@
 			OtherInfo otherInfo = new OtherInfo();
 			otherInfo.setReduceHongBao(newUserHongBao);
 			goodsDetail.setOtherInfo(otherInfo);
-			
+
+			// 涓撳睘鏍囩
+			List<ClientTextStyleVO> labels = new ArrayList<ClientTextStyleVO>();
+			labels.add(new ClientTextStyleVO("鏂颁汉涓撳睘", "#FE0014"));
+			labels.add(new ClientTextStyleVO("瀹炰粯0鍏�", "#FF9600"));
+			goodsDetail.setLabels(labels);
+
 		} else {// 鏅�氳喘涔�
 			OtherInfo otherInfo = new OtherInfo();
 			RewardCouponVO rewardCoupon = new RewardCouponVO();
 			rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
 			JSONObject params1 = new JSONObject();
-			params1.put("url", configService.get("special_guide_reward_coupon_link"));
-
-			rewardCoupon.setMaxMoney("楼" + TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add(MoneyBigDecimalUtil
-					.mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate), Constant.MAX_REWARD_RATE)));
-			if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
+			if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
+				params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
+			else
+				params1.put("url", userVipConfigService.getValueByKey("vip_link"));
+			rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
+			if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
 				rewardCoupon.setDesc("杩�");
-				params1.put("url", configService.get("vip_link"));
+				params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 				rewardCoupon.getJumpDetail().setNeedLogin(true);
 			} else
 				rewardCoupon.setDesc("鐢ㄨ繑鍒╁鍔卞埜鏈�楂樿繑");
 			rewardCoupon.setParams(params1.toString());
+
 			otherInfo.setRewardCoupon(rewardCoupon);
+			if ("ios".equalsIgnoreCase(acceptData.getPlatform())
+					&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+				otherInfo.setRewardCoupon(null);
+
 			goodsDetail.setOtherInfo(otherInfo);
 		}
 		extraVO.setFanliValid(fanliValid);
@@ -527,7 +570,7 @@
 
 		// 鍒嗕韩璺緞
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get("no_rebate_help_link");
+			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
 		}
 
 		// 鍒嗕韩璺緞
@@ -592,10 +635,17 @@
 		// 淇濆瓨缂撳瓨
 		jdGoodsCacheUtil.saveGoodsInfo(jdGoods);
 
-		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-		BigDecimal shareRate = hongBaoManageService.getShareRate();
-		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
+		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());
+			goodsDetail.getMoneyInfo()
+					.setShareMoney("楼" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPShareRate()));
+			goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
+		}
+		goodsDetail.getMoneyInfo()
+				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
 
 		// 闄勫姞淇℃伅
 		OtherInfo otherInfo = new OtherInfo();
@@ -613,13 +663,13 @@
 				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())) {
+					if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
 						maxMoneyPlus = "锛堜含涓減lus杩斅�"
-								+ fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
-								+ "锛�";
+								+ JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getVIPFanLiRate()) + "锛�";
 					} else
 						maxMoneyPlus = "锛堜含涓減lus鏈�楂樿繑楼"
 								+ fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
@@ -633,19 +683,26 @@
 		rewardCoupon.setMaxMoneyPlus(maxMoneyPlus);
 		rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
 		JSONObject params1 = new JSONObject();
-		params1.put("url", configService.get("special_guide_reward_coupon_link"));
+		if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
+			params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
+		else
+			params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 
-		rewardCoupon.setMaxMoney("楼" + JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate)
-				.add(MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE)));
-		if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
+		rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
+		if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
 			rewardCoupon.setDesc("杩�");
-			params1.put("url", configService.get("vip_link"));
+			params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 			rewardCoupon.getJumpDetail().setNeedLogin(true);
 		} else {
 			rewardCoupon.setDesc("鐢ㄨ繑鍒╁鍔卞埜鏈�楂樿繑");
 		}
 		rewardCoupon.setParams(params1.toString());
+		
 		otherInfo.setRewardCoupon(rewardCoupon);
+		if ("ios".equalsIgnoreCase(acceptData.getPlatform())
+				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+			otherInfo.setRewardCoupon(null);
+		
 		goodsDetail.setOtherInfo(otherInfo);
 
 		CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
@@ -677,7 +734,7 @@
 		List<ShamUser> listShareUser = new ArrayList<ShamUser>();
 
 		// 浜笢寮�鍚垎浜�
-		String open = configService.get("share_jd_open");
+		String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
 		if ("1".equals(open.trim())) {
 			extraVO.setShareValid(true);
 			MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
@@ -730,7 +787,7 @@
 		extraVO.setFanliValid(true);
 
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get("no_rebate_help_link");
+			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
 		}
 
 		ShareVO shareInfoVO = new ShareVO();
@@ -780,28 +837,40 @@
 			return;
 		}
 
-		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-		BigDecimal shareRate = hongBaoManageService.getShareRate();
-		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
+		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());
+			goodsDetail.getMoneyInfo().setShareMoney(
+					"楼" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
+			goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
+		}
+		goodsDetail.getMoneyInfo()
+				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
 
 		// 闄勫姞淇℃伅
 		OtherInfo otherInfo = new OtherInfo();
 		RewardCouponVO rewardCoupon = new RewardCouponVO();
 		rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
 		JSONObject params1 = new JSONObject();
-		params1.put("url", configService.get("special_guide_reward_coupon_link"));
+		if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
+			params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
+		else
+			params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 
-		rewardCoupon.setMaxMoney("楼" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil
-				.mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate), Constant.MAX_REWARD_RATE)));
-		if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
+		rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
+		if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
 			rewardCoupon.setDesc("杩�");
-			params1.put("url", configService.get("vip_link"));
+			params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 			rewardCoupon.getJumpDetail().setNeedLogin(true);
 		} else
 			rewardCoupon.setDesc("鐢ㄨ繑鍒╁鍔卞埜鏈�楂樿繑");
 		rewardCoupon.setParams(params1.toString());
 		otherInfo.setRewardCoupon(rewardCoupon);
+		if ("ios".equalsIgnoreCase(acceptData.getPlatform())
+				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+			otherInfo.setRewardCoupon(null);
 		goodsDetail.setOtherInfo(otherInfo);
 
 		CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
@@ -829,7 +898,7 @@
 		}
 
 		// 鍥炬枃璇︽儏
-		extraVO.setDetailUrl("http://apph5.yeshitv.com/apppage/goods_img_pdd.html?id=" + id);
+		extraVO.setDetailUrl("http://apph5.banliapp.com/apppage/goods_img_pdd.html?id=" + id);
 
 		String salesTip = pddGoods.getSalesTip();
 		if (!StringUtil.isNullOrEmpty(salesTip)) {
@@ -889,7 +958,7 @@
 		extraVO.setShareValid(true);
 
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get("no_rebate_help_link");
+			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
 		}
 
 		ShareVO shareInfoVO = new ShareVO();
@@ -945,9 +1014,8 @@
 					list = list.subList(0, 10);
 				}
 
-				BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-				BigDecimal shareRate = hongBaoManageService.getShareRate();
-				ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
+				ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+						acceptData.getVersion());
 				List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>();
 
 				for (JDGoods goods : list) {
@@ -988,10 +1056,8 @@
 								goodsList = goodsList.subList(0, 10);
 							}
 
-							BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-							BigDecimal shareRate = hongBaoManageService.getShareRate();
-							ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate,
-									Constant.MAX_REWARD_RATE);
+							ConfigParamsDTO paramsDTO = hongBaoManageService
+									.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
 							for (PDDGoodsDetail goods : goodsList) {
 								listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO));
 							}
@@ -1034,9 +1100,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);
+				ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+						acceptData.getVersion());
 
 				goodsList.parallelStream().forEach(goods -> {
 					if (goods != null) {
@@ -1313,7 +1378,8 @@
 		Map<String, GoodsDetailVO> tempGoodsList = new HashMap<>();
 
 		ConfigParamsDTO params = new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
-				hongBaoManageService.getShareRate(), new BigDecimal(80));
+				hongBaoManageService.getShareRate(), new BigDecimal(80), hongBaoManageService.getVIPFanLiRate());
+		hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
 
 		if (tbGoodsList.size() > 0) {
 			List<TaoBaoGoodsBrief> goodsList = null;
@@ -1334,14 +1400,14 @@
 		if (jdGoodsList.size() > 0) {
 			List<JDGoods> goodsList = JDApiUtil.getGoodsDetail(jdGoodsList);
 			for (JDGoods goods : goodsList) {
-				tempGoodsList.put(goods.getSkuId() + "-" + Constant.SOURCE_TYPE_TAOBAO,
+				tempGoodsList.put(goods.getSkuId() + "-" + Constant.SOURCE_TYPE_JD,
 						GoodsDetailVOFactory.convertJDGoods(goods, params));
 			}
 		}
 		if (pddGoodsList.size() > 0) {
 			List<PDDGoodsDetail> goodsList = PinDuoDuoApiUtil.listGoodsDetail(pddGoodsList);
 			for (PDDGoodsDetail goods : goodsList) {
-				tempGoodsList.put(goods.getGoodsId() + "-" + Constant.SOURCE_TYPE_TAOBAO,
+				tempGoodsList.put(goods.getGoodsId() + "-" + Constant.SOURCE_TYPE_PDD,
 						GoodsDetailVOFactory.convertPDDGoods(goods, params));
 			}
 		}

--
Gitblit v1.8.0