From dc5be7d38446f70e6ff86df311119c32b41fe7f8 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 28 十一月 2020 16:37:05 +0800
Subject: [PATCH] 大淘客搜索接口升级

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java |   46 ++++++++++++++++++++++------------------------
 1 files changed, 22 insertions(+), 24 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 158493b..044acc7 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
@@ -29,7 +29,6 @@
 import com.google.gson.stream.JsonWriter;
 import com.yeshi.fanli.dto.ConfigParamsDTO;
 import com.yeshi.fanli.entity.accept.AcceptData;
-import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
 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;
@@ -38,8 +37,8 @@
 import com.yeshi.fanli.entity.taobao.ShareHotGoods;
 import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
 import com.yeshi.fanli.entity.taobao.TLJFreeBuyGoods;
-import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
-import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
+import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief;
+import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBriefExtra;
 import com.yeshi.fanli.exception.user.UserInfoException;
 import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
 import com.yeshi.fanli.service.inter.config.ConfigService;
@@ -66,15 +65,16 @@
 import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.TaoBaoConstant;
-import com.yeshi.fanli.util.TimeUtil;
+import org.yeshi.utils.TimeUtil;
 import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
 import com.yeshi.fanli.util.taobao.TaoBaoUtil;
 import com.yeshi.fanli.util.taobao.TaoLiJinUtil;
 import com.yeshi.fanli.vo.goods.GoodsDetailVO;
 import com.yeshi.fanli.vo.goods.MoneyInfoVO;
 import com.yeshi.fanli.vo.goods.OtherInfo;
-import com.yeshi.fanli.vo.goods.taobao.TLJBuyHongBaoVO;
-import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
+import com.yeshi.goods.facade.entity.taobao.TLJBuyHongBaoVO;
+import com.yeshi.fanli.vo.homemodule.BannerVO;
+import com.yeshi.common.vo.ClientTextStyleVO;
 import com.yeshi.fanli.vo.redpack.TaoLiJinWinDetailVO;
 import com.yeshi.fanli.vo.tlj.ReduceHongBao;
 import com.yeshi.fanli.vo.tlj.SpreadHongBao;
@@ -417,7 +417,7 @@
 			}
 		}
 
-		BigDecimal proportion = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
+		BigDecimal proportion = hongBaoManageService.getTLJShareRate(System.currentTimeMillis(),acceptData.getSystem());
 		for (ShareHotGoods hotGoods : listHot) {
 			TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
 			if (taoBaoGoodsBrief == null) {
@@ -492,7 +492,7 @@
 		}
 
 		ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
-				acceptData.getVersion());
+				acceptData.getVersion(),acceptData.getSystem());
 
 		for (ShareHotGoods hotGoods : listHot) {
 			TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
@@ -560,7 +560,6 @@
 	 * 鍒嗕韩鐖嗘鍟嗗搧-闄愪簬娣樼ぜ閲�
 	 * 
 	 * @param acceptData
-	 * @param uid
 	 * @param out
 	 */
 	@RequestMapping(value = "getBuyGoods", method = RequestMethod.POST)
@@ -584,7 +583,7 @@
 			}
 
 			// 璁$畻鎺ㄥ箍绾㈠寘
-			BigDecimal spreadMoney = TaoBaoUtil.getGoodsHongBaoMoney(taoBaoGoodsBrief, proportion);
+			BigDecimal spreadMoney = TaoBaoUtil.getGoodsHongBaoMoney(taoBaoGoodsBrief, proportion,true);
 
 			// 鎺ㄥ箍绾㈠寘 涓嶈兘灏忎簬1
 			if (spreadMoney.compareTo(new BigDecimal(1.0)) < 0) {
@@ -618,15 +617,15 @@
 		data.put("count", array.size());
 		data.put("list", array);
 		if (page == 1) {
-			List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
-					acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
+			List<BannerVO> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
+					acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
 
 			if (bannerList != null && bannerList.size() > 0)
 				data.put("topPicture", bannerList.get(0).getSrc());
 			else
 				data.put("topPicture", "");
 
-			data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
+			data.put("ruleUrl", configService.getValue(ConfigKeyEnum.zigoulijianRule.getKey(),acceptData.getSystem()));
 		}
 		out.print(JsonUtil.loadTrueResult(data));
 	}
@@ -635,7 +634,6 @@
 	 * 鍒嗕韩鐖嗘鍟嗗搧-闄愪簬娣樼ぜ閲�
 	 * 
 	 * @param acceptData
-	 * @param uid
 	 * @param out
 	 */
 	@RequestMapping(value = "getBuyGoodsV2", method = RequestMethod.POST)
@@ -653,7 +651,7 @@
 
 		BigDecimal proportion = TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE;
 		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(proportion, proportion, Constant.MAX_REWARD_RATE,
-				hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP));
+				hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem()));
 		for (TLJBuyGoods hotGoods : listHot) {
 			TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
 			if (taoBaoGoodsBrief == null) {
@@ -661,7 +659,7 @@
 			}
 
 			// 璁$畻鎺ㄥ箍绾㈠寘
-			BigDecimal spreadMoney = TaoBaoUtil.getGoodsHongBaoMoney(taoBaoGoodsBrief, proportion);
+			BigDecimal spreadMoney = TaoBaoUtil.getGoodsHongBaoMoney(taoBaoGoodsBrief, proportion,true);
 
 			// 鎺ㄥ箍绾㈠寘 涓嶈兘灏忎簬1
 			if (spreadMoney.compareTo(new BigDecimal(1.0)) < 0) {
@@ -707,15 +705,15 @@
 		data.put("count", array.size());
 		data.put("list", array);
 		if (page == 1) {
-			List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
-					acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
+			List<BannerVO> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
+					acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
 
 			if (bannerList != null && bannerList.size() > 0)
 				data.put("topPicture", bannerList.get(0).getSrc());
 			else
 				data.put("topPicture", "");
 
-			data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
+			data.put("ruleUrl", configService.getValue(ConfigKeyEnum.zigoulijianRule.getKey(),acceptData.getSystem()));
 		}
 		out.print(JsonUtil.loadTrueResult(data));
 	}
@@ -755,9 +753,9 @@
 			}
 
 			// 2銆侀《閮ㄨ疆鎾浘
-			List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion(
-					"redpack_win_detail_banner", acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
-			List<SwiperPicture> topPicList = new ArrayList<>();
+			List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion(
+					"redpack_win_detail_banner", acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
+			List<BannerVO> topPicList = new ArrayList<>();
 			if (oldtopPicList != null && oldtopPicList.size() > 0)
 				topPicList.addAll(oldtopPicList);
 
@@ -794,7 +792,7 @@
 				.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
 		ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
-				acceptData.getVersion());
+				acceptData.getVersion(),acceptData.getSystem());
 
 		for (TLJFreeBuyGoods freeGoods : listFree) {
 			TaoBaoGoodsBrief goods = freeGoods.getGoods();
@@ -847,7 +845,7 @@
 			}
 
 			String rule = configTaoLiJinService.getValueByKey("new_user_free_buy_list_rule");
-			rule = rule.replace("{閾炬帴}", configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
+			rule = rule.replace("{閾炬帴}", configService.getValue(ConfigKeyEnum.customerServiceLink.getKey(),acceptData.getSystem()));
 
 			data.put("state", state);
 			data.put("balance", "鏂颁汉绾㈠寘锛�" + balance.setScale(2) + "鍏�");

--
Gitblit v1.8.0