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/TaoLiJinControllerV2.java |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
index 4a5e911..6eb1f6d 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
@@ -33,6 +33,7 @@
 import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinDetail.TaoLiJinDetailTypeEnum;
 import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinNewbies;
 import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
 import com.yeshi.fanli.entity.taobao.ShareHotGoods;
 import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
 import com.yeshi.fanli.entity.taobao.TLJFreeBuyGoods;
@@ -487,10 +488,9 @@
 				isNewUser = false;
 			}
 		}
-
-		BigDecimal fanLiRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
-		BigDecimal shareRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
-	    ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
+		
+	    ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+				acceptData.getVersion());
 
 		for (ShareHotGoods hotGoods : listHot) {
 			TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
@@ -616,14 +616,14 @@
 		data.put("count", array.size());
 		data.put("list", array);
 		if (page == 1) {
-			List<SwiperPicture> bannerList = swiperPictureService.getByBannerCard("zigoulijian_banner");
+			List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
 
 			if (bannerList != null && bannerList.size() > 0)
 				data.put("topPicture", bannerList.get(0).getSrc());
 			else
 				data.put("topPicture", "");
 
-			data.put("ruleUrl", configService.get("zigoulijian_rule"));
+			data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
 		}
 		out.print(JsonUtil.loadTrueResult(data));
 	}
@@ -703,14 +703,14 @@
 		data.put("count", array.size());
 		data.put("list", array);
 		if (page == 1) {
-			List<SwiperPicture> bannerList = swiperPictureService.getByBannerCard("zigoulijian_banner");
+			List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
 
 			if (bannerList != null && bannerList.size() > 0)
 				data.put("topPicture", bannerList.get(0).getSrc());
 			else
 				data.put("topPicture", "");
 
-			data.put("ruleUrl", configService.get("zigoulijian_rule"));
+			data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
 		}
 		out.print(JsonUtil.loadTrueResult(data));
 	}
@@ -752,7 +752,7 @@
 			}
 
 			// 2銆侀《閮ㄨ疆鎾浘
-			List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCard("redpack_win_detail_banner");
+			List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("redpack_win_detail_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
 			List<SwiperPicture> topPicList = new ArrayList<>();
 			if (oldtopPicList != null && oldtopPicList.size() > 0)
 				topPicList.addAll(oldtopPicList);
@@ -790,8 +790,9 @@
 		Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
 				.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
-		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
-		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, fanLiRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
+		ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+				acceptData.getVersion());
+
 		for (TLJFreeBuyGoods freeGoods : listFree) {
 			TaoBaoGoodsBrief goods = freeGoods.getGoods();
 			if (goods == null)
@@ -842,9 +843,12 @@
 				}
 			}
 			
+			String rule = configTaoLiJinService.getValueByKey("new_user_free_buy_list_rule");
+			rule = rule.replace("{閾炬帴}", configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
+			
 			data.put("state", state);
 			data.put("balance","鏂颁汉绾㈠寘锛�" + balance.setScale(2) + "鍏�");
-			data.put("rule", configTaoLiJinService.getValueByKey("new_user_free_buy_list_rule"));
+			data.put("rule", rule);
 		}
 		JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
 	}

--
Gitblit v1.8.0