From 651a15c78f668bef3859d9ed1bb7ad0b669d3600 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 03 七月 2020 17:52:07 +0800
Subject: [PATCH] 多APP优化

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java |   70 +++++++++++++++++------------------
 1 files changed, 34 insertions(+), 36 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 e7be381..ea4855b 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
@@ -301,7 +301,7 @@
 		// IOS鏄惁姝e湪涓婄嚎
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
 			String version = acceptData.getVersion();
-			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
+			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
 		}
 
 		long startTime = java.lang.System.currentTimeMillis();
@@ -320,7 +320,7 @@
 
 		// final List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
 		// 鏄惁鍦ㄦ湇鍔$杩涜杞摼
-		boolean convertInServer = configService.isConvertTaoBaoLinkInServer();
+		boolean convertInServer = configService.isConvertTaoBaoLinkInServer(acceptData.getSystem());
 
 		TaoBaoGoodsBrief goods = null;
 
@@ -459,7 +459,7 @@
 			goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
 		}
 		goodsDetail.getMoneyInfo()
-				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
+				.setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
 
 		if (TaoBaoUtil.isYUShou(goods)) {
 			if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
@@ -532,7 +532,7 @@
 			extraVO.setIsNative(true);
 		}
 
-		String h5Url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(),
+		String h5Url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(acceptData.getSystem()),
 				Constant.systemCommonConfig.getShareGoodsPagePath(), "", id + "");
 
 		extraVO.setH5Url(h5Url);
@@ -554,7 +554,7 @@
 			moneyType = 2;
 			fanliValid = true;
 			shareValid = false;
-			helpLink = configService.get(ConfigKeyEnum.zigoulijianNofanliHelp.getKey());
+			helpLink = configService.getValue(ConfigKeyEnum.zigoulijianNofanliHelp.getKey(),acceptData.getSystem());
 
 			BigDecimal tljHongBao = TaoBaoUtil.getGoodsHongBaoMoney(goods, TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE,
 					false);
@@ -615,7 +615,7 @@
 			rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
 			JSONObject params1 = new JSONObject();
 			if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
-				params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
+				params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
 			else
 				params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 			rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -629,7 +629,7 @@
 
 			otherInfo.setRewardCoupon(rewardCoupon);
 			if ("ios".equalsIgnoreCase(acceptData.getPlatform())
-					&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+					&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
 				otherInfo.setRewardCoupon(null);
 
 			goodsDetail.setOtherInfo(otherInfo);
@@ -644,7 +644,7 @@
 
 		// 鍒嗕韩璺緞
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
+			helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
 		}
 
 		// 鍒嗕韩璺緞
@@ -733,7 +733,7 @@
 			goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
 		}
 		goodsDetail.getMoneyInfo()
-				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
+				.setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
 
 		// 闄勫姞淇℃伅
 		OtherInfo otherInfo = new OtherInfo();
@@ -772,7 +772,7 @@
 		rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
 		JSONObject params1 = new JSONObject();
 		if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
-			params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
+			params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
 		else
 			params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 
@@ -788,7 +788,7 @@
 
 		otherInfo.setRewardCoupon(rewardCoupon);
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())
-				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
 			otherInfo.setRewardCoupon(null);
 
 		goodsDetail.setOtherInfo(otherInfo);
@@ -815,14 +815,14 @@
 		// IOS鏄惁姝e湪涓婄嚎
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
 			String version = acceptData.getVersion();
-			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
+			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
 		}
 
 		Long inOrderCount30Days = jdGoods.getInOrderCount30Days();
 		List<ShamUser> listShareUser = new ArrayList<ShamUser>();
 
 		// 浜笢寮�鍚垎浜�
-		String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
+		String open = configService.getValue(ConfigKeyEnum.shareOpenJD.getKey(),acceptData.getSystem());
 		if ("1".equals(open.trim())) {
 			extraVO.setShareValid(true);
 			MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
@@ -863,7 +863,7 @@
 		}
 
 		// 鍟嗗搧閾炬帴
-		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
+		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
 				Constant.systemCommonConfig.getShareGoodsPagePathJD(), "", id + "");
 		// try {
 		// extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -875,7 +875,7 @@
 		extraVO.setFanliValid(true);
 
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
+			helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
 		}
 
 		ShareVO shareInfoVO = new ShareVO();
@@ -948,7 +948,7 @@
 			goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
 		}
 		goodsDetail.getMoneyInfo()
-				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
+				.setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
 
 		// 闄勫姞淇℃伅
 		OtherInfo otherInfo = new OtherInfo();
@@ -956,7 +956,7 @@
 		rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
 		JSONObject params1 = new JSONObject();
 		if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
-			params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
+			params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
 		else
 			params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 
@@ -970,7 +970,7 @@
 		rewardCoupon.setParams(params1.toString());
 		otherInfo.setRewardCoupon(rewardCoupon);
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())
-				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
 			otherInfo.setRewardCoupon(null);
 		goodsDetail.setOtherInfo(otherInfo);
 
@@ -995,7 +995,7 @@
 		// IOS鏄惁姝e湪涓婄嚎
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
 			String version = acceptData.getVersion();
-			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
+			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
 		}
 
 		// 鍥炬枃璇︽儏
@@ -1046,7 +1046,7 @@
 		extraVO.setIsNative(true);
 
 		// 鍒嗕韩璺緞
-		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
+		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
 				Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
 		// try {
 		// extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -1059,7 +1059,7 @@
 		extraVO.setShareValid(true);
 
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
+			helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
 		}
 
 		ShareVO shareInfoVO = new ShareVO();
@@ -1146,7 +1146,7 @@
 			goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
 		}
 		goodsDetail.getMoneyInfo()
-				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
+				.setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
 
 		// 闄勫姞淇℃伅
 		OtherInfo otherInfo = new OtherInfo();
@@ -1154,7 +1154,7 @@
 		rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
 		JSONObject params1 = new JSONObject();
 		if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
-			params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
+			params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(),acceptData.getSystem()));
 		else
 			params1.put("url", userVipConfigService.getValueByKey("vip_link"));
 
@@ -1166,7 +1166,7 @@
 		rewardCoupon.setParams(params1.toString());
 		otherInfo.setRewardCoupon(rewardCoupon);
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())
-				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
 			otherInfo.setRewardCoupon(null);
 		goodsDetail.setOtherInfo(otherInfo);
 
@@ -1183,7 +1183,7 @@
 		// IOS鏄惁姝e湪涓婄嚎
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
 			String version = acceptData.getVersion();
-			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
+			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
 		}
 
 		// 鍥炬枃璇︽儏
@@ -1201,7 +1201,7 @@
 		extraVO.setIsNative(true);
 
 		// 鍒嗕韩璺緞
-		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
+		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
 				Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
 		// try {
 		// extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -1214,7 +1214,7 @@
 		extraVO.setShareValid(true);
 
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
+			helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
 		}
 
 		ShareVO shareInfoVO = new ShareVO();
@@ -1278,7 +1278,7 @@
 			goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
 		}
 		goodsDetail.getMoneyInfo()
-				.setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
+				.setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
 
 		// 闄勫姞淇℃伅
 		OtherInfo otherInfo = new OtherInfo();
@@ -1296,7 +1296,7 @@
 		rewardCoupon.setParams(params1.toString());
 		otherInfo.setRewardCoupon(rewardCoupon);
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())
-				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
+				&& configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()))
 			otherInfo.setRewardCoupon(null);
 		goodsDetail.setOtherInfo(otherInfo);
 
@@ -1313,7 +1313,7 @@
 		// IOS鏄惁姝e湪涓婄嚎
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
 			String version = acceptData.getVersion();
-			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
+			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
 		}
 
 		// 鍥炬枃璇︽儏
@@ -1335,7 +1335,7 @@
 		extraVO.setIsNative(true);
 
 		// 鍒嗕韩璺緞
-		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
+		String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
 				Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
 		// try {
 		// extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
@@ -1348,7 +1348,7 @@
 		extraVO.setShareValid(true);
 
 		if (StringUtil.isNullOrEmpty(helpLink)) {
-			helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
+			helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
 		}
 
 		ShareVO shareInfoVO = new ShareVO();
@@ -1387,9 +1387,9 @@
 	 */
 	private void getCloudInfo(AcceptData acceptData,Long uid, GoodsDetailVO goodsDetail, GoodsDetailExtraVO extraVO) {
 		// 浜戝彂鍗曟槸鍚﹀紑鍚�
-		boolean cloudOpen = configService.isRobotCloudOpen(ConfigKeyEnum.robotCloudOpenGoodsDetail.getKey(),acceptData.getPlatform(),acceptData.getVersion());
+		boolean cloudOpen = configService.isRobotCloudOpen(ConfigKeyEnum.robotCloudOpenGoodsDetail.getKey(),acceptData.getPlatform(),acceptData.getVersion(),acceptData.getSystem());
 		if (!cloudOpen && uid != null) {
-			List<String> testUsers = configService.getTestUsers();
+			List<String> testUsers = configService.getTestUsers(acceptData.getSystem());
 			if (testUsers != null && testUsers.contains(uid+"")) {
 				cloudOpen = true;
 			}
@@ -1701,7 +1701,6 @@
 	 * @param uid
 	 * @param id
 	 * @param source
-	 * @param request
 	 * @param out
 	 */
 	@RequestMapping(value = "getPDDLink")
@@ -1747,7 +1746,6 @@
 	 * @param uid
 	 * @param id
 	 * @param source
-	 * @param request
 	 * @param out
 	 */
 	@RequestMapping(value = "getVIPLink")

--
Gitblit v1.8.0