From f3bf8ec5da40f49505b561abe53e8972dcce18ba Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 02 九月 2019 17:53:05 +0800
Subject: [PATCH] 自购立减商品验证修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java
index 9e06eb2..acbc8b3 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java
@@ -86,11 +86,9 @@
 
 	@Resource
 	private TLJBuyGoodsService tljBuyGoodsService;
-	
+
 	@Resource
 	private IntegralGetService integralGetService;
-	
-	
 
 	private void doTaoLiJinBuy(AcceptData acceptData, Long uid, Long auctionId, PrintWriter out) {
 		JSONObject data = new JSONObject();
@@ -99,6 +97,10 @@
 			// 鏍规嵁鏃ユ湡涓庡晢鍝両D鏌ヨ
 			TLJBuyGoods tljBuyGoods = tljBuyGoodsService.selectByAuctionIdAndDay(auctionId,
 					TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
+			if (tljBuyGoods == null) {
+				out.print(JsonUtil.loadFalseResult(1, "鍟嗗搧涓嶅瓨鍦�"));
+				return;
+			}
 			String appKey = tljBuyGoods.getAppKey();
 			TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppKeyCache(appKey);
 			if (config == null) {
@@ -121,7 +123,7 @@
 		data.put("type", 1);
 		data.put("link", link);
 		out.print(JsonUtil.loadTrueResult(data));
-		
+
 		integralGetService.addTaoLiJinBuy(uid, auctionId);
 	}
 
@@ -289,7 +291,7 @@
 
 			// 鑾峰緱閲戝竵
 			integralGetService.addCouponRebate(uid);
-			
+
 		} catch (Exception e) {
 
 			LogHelper.errorDetailInfo(e);
@@ -421,7 +423,7 @@
 		history.setGoodsId(goodsId);
 		recommendGoodsDeleteHistoryService.addRecommendGoodsDeleteHistory(history);
 		out.print(JsonUtil.loadTrueResult(""));
-		
+
 		// 鑾峰緱閲戝竵
 		integralGetService.addCloseRecommendGoods(uid);
 	}

--
Gitblit v1.8.0