From 3824cbcaec6e6c67418d5280a53e9c2fedeef6f9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 11 七月 2019 16:34:13 +0800
Subject: [PATCH] 订单bug,分享爆款自购修改

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java
index a2bd599..3013305 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java
@@ -667,7 +667,8 @@
 	}
 
 	@Override
-	public TaoBaoLink getTaoLiJinLinkForBuy(Long uid, String specialId, Long auctionId) throws ShareGoodsException {
+	public TaoBaoLink getTaoLiJinLinkForBuy(Long uid, String specialId, Long auctionId, String pid)
+			throws ShareGoodsException {
 		if (uid == null || uid <= 0) {
 			throw new ShareGoodsException(1, "鐢ㄦ埛ID涓嶈兘涓虹┖");
 		}
@@ -685,7 +686,10 @@
 		TaoKeAppInfo app = new TaoKeAppInfo();
 		app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY);
 		app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
-		app.setPid(TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT);
+		if (pid == null)
+			app.setPid(TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT);
+		else
+			app.setPid(pid);
 		TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCoupon(auctionId, app);
 		if (goods == null) {
 			throw new ShareGoodsException(1, "");
@@ -799,7 +803,7 @@
 
 		boolean canBuy = userTLJBuyHistoryService.canBuy(uid, auctionId);
 		if (!canBuy) {
-			throw new ShareGoodsException(3, "鍚屼竴鍟嗗搧姣忔棩鍙兘棰嗗彇涓夋");
+			throw new ShareGoodsException(3, "绔嬪噺绾㈠寘宸叉姠鍏夛紝璇风◢鍚庡啀璇�");
 		}
 
 		long currentTime = System.currentTimeMillis();
@@ -819,6 +823,7 @@
 			taoLiJinDTO = TaoKeApiUtil.createTaoLiJin(auctionId, "鑷喘绔嬪噺", perface, 1, new Date(currentTime), sendEndTime,
 					new Date(currentTime), sendEndTime, app);
 		} catch (TaoKeApiException e) {
+			LogHelper.errorDetailInfo(e, e.getMessage(), null);
 			throw new ShareGoodsException(5, "鐢熸垚鎺ㄥ箍閾炬帴澶辫触");
 		}
 		if (taoLiJinDTO == null)

--
Gitblit v1.8.0