From 009e25b40c04d0a66d6d6554c19e542f0e6f9d18 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 23 七月 2019 10:49:58 +0800
Subject: [PATCH] 根据粘贴板推荐修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java |   68 +++++++++++-----------------------
 1 files changed, 22 insertions(+), 46 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 db168956..af5cb72 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
@@ -58,6 +58,7 @@
 import com.yeshi.fanli.util.TaoBaoConstant;
 import com.yeshi.fanli.util.ThreadUtil;
 import com.yeshi.fanli.util.TimeUtil;
+import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
 import com.yeshi.fanli.util.cache.TaoBaoGoodsCacheUtil;
 import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
 import com.yeshi.fanli.util.factory.goods.ShopInfoVOFactory;
@@ -147,42 +148,8 @@
 	@Resource
 	private TLJBuyGoodsService tljBuyGoodsService;
 	
-	
-	/**
-	 * 鑾峰彇鍟嗗搧璇︽儏
-	 * 
-	 * @param acceptData
-	 * @param id
-	 * @param source
-	 * @param uid
-	 * @param from
-	 * @param out
-	 */
-	@RequestMapping(value = "getDetail", method = RequestMethod.POST)
-	public void getDetail(AcceptData acceptData, Long id, Integer goodsType, Long uid, String from, PrintWriter out) {
-		if (id == null) {
-			out.print(JsonUtil.loadFalseResult(1, "鍟嗗搧id涓嶈兘涓虹┖"));
-			return;
-		}
-		
-		// 娣樺疂鍟嗗搧
-		if (goodsType == null || Constant.SOURCE_TYPE_TAOBAO == goodsType) {
-			getTaoBaoGoodsDetial(acceptData, id, uid, from, out);
-			return;
-		}
-
-		// 浜笢鍟嗗搧
-		if (Constant.SOURCE_TYPE_JD == goodsType) {
-			getJDGoodsDetial(acceptData, id, uid, from, out);
-			return;
-		}
-
-		// 鎷煎澶氬晢鍝�
-		if (Constant.SOURCE_TYPE_PDD == goodsType) {
-			getPDDGoodsDetial(acceptData, id, uid, from, out);
-			return;
-		}
-	}
+	@Resource
+	private JDGoodsCacheUtil jdGoodsCacheUtil;
 	
 	
 	/**
@@ -193,12 +160,13 @@
 	 * @param from
 	 * @param out
 	 */
-	public void getTaoBaoGoodsDetial(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
+	@RequestMapping(value = "getDetailTB", method = RequestMethod.POST)
+	public void getDetialTB(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
 		if (id == null) {
-			out.print(JsonUtil.loadFalseResult(1, "璇蜂笂浼爄d"));
+			out.print(JsonUtil.loadFalseResult(1, "鍟嗗搧id涓嶈兘涓虹┖"));
 			return;
 		}
-
+		
 		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
 				acceptData.getPackages());
 		if (system == null) {
@@ -451,11 +419,11 @@
 
 			SpreadHongBao spreadHongBao = new SpreadHongBao();
 			if (isNewUser) {
-				spreadHongBao.setMoney("楼1");
+				spreadHongBao.setMoney("1");
 			} else {
 				moneyType = 2;
 				fanliValid = false;
-				spreadHongBao.setMoney("楼" + spreadMoney.toString());
+				spreadHongBao.setMoney(spreadMoney.toString());
 				
 				ClientTextStyleVO textStyleVO1 = new ClientTextStyleVO();
 				textStyleVO1.setContent("鍒嗕韩");
@@ -512,7 +480,7 @@
 			ReduceHongBao reduceHongBao = new ReduceHongBao();
 			reduceHongBao.setLeft(buyGoods.getLeftHongBaoCount());
 			reduceHongBao.setMoney(tljHongBao);
-			reduceHongBao.setName("浠樻绔嬪噺 楼" + tljHongBao);
+			reduceHongBao.setName("浠樻绔嬪噺 ");
 			reduceHongBao.setTip("褰撴棩棰嗗彇锛屽綋鏃ュ唴浣跨敤锛岃繃鏈熷け鏁�");
 			reduceHongBao.setTotal(buyGoods.getTotalHongBaoCount());
 			
@@ -570,7 +538,8 @@
 	 * @param from
 	 * @param out
 	 */
-	public void getJDGoodsDetial(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
+	@RequestMapping(value = "getDetailJD", method = RequestMethod.POST)
+	public void getDetialJD(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
 		// 绯荤粺楠岃瘉
 		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
 				acceptData.getPackages());
@@ -588,6 +557,10 @@
 			out.print(JsonUtil.loadFalseResult(2, "鍟嗗搧涓嶅瓨鍦�"));
 			return;
 		}
+		
+		// 淇濆瓨缂撳瓨
+		jdGoodsCacheUtil.saveGoodsInfo(jdGoods);
+		
 
 		BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
 		BigDecimal shareRate = hongBaoManageService.getShareRate();
@@ -689,7 +662,7 @@
 	}
 
 	/**
-	 * 浜笢鍟嗗搧璇︽儏
+	 * 鎷煎澶氬晢鍝佽鎯�
 	 * 
 	 * @param acceptData
 	 * @param id
@@ -697,7 +670,8 @@
 	 * @param from
 	 * @param out
 	 */
-	public void getPDDGoodsDetial(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
+	@RequestMapping(value = "getDetailPDD", method = RequestMethod.POST)
+	public void getDetialPDD(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
 		// 绯荤粺楠岃瘉
 		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
 				acceptData.getPackages());
@@ -723,7 +697,9 @@
 			String version = acceptData.getVersion();
 			extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
 		}
-
+		
+		// 鍥炬枃璇︽儏
+		extraVO.setDetailUrl("http://apph5.yeshitv.com/apppage/goods_img_pdd.html?id="+ id);
 		
 		Long inOrderCount30Days = pddGoods.getSoldQuantity();
 		List<ShamUser> listShareUser = new ArrayList<ShamUser>();

--
Gitblit v1.8.0