From e1a62ec62e7331d97af9302e90e1ce44af8235eb Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 27 一月 2021 15:26:55 +0800
Subject: [PATCH] 拼多多授权绑定

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java
index fe827c0..5a7e535 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandShopCaheServiceImpl.java
@@ -5,6 +5,7 @@
 
 import javax.annotation.Resource;
 
+import com.yeshi.fanli.util.Constant;
 import org.springframework.stereotype.Service;
 
 import com.yeshi.fanli.dao.brand.BrandShopCaheDao;
@@ -14,7 +15,7 @@
 import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
 import com.yeshi.fanli.entity.brand.BrandInfo;
 import com.yeshi.fanli.entity.brand.BrandShopCahe;
-import com.yeshi.fanli.entity.taobao.TaoBaoShop;
+import com.yeshi.common.entity.taobao.TaoBaoShop;
 import com.yeshi.fanli.service.inter.brand.BrandShopCaheService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
 import com.yeshi.fanli.util.StringUtil;
@@ -80,10 +81,10 @@
 	 * @return
 	 */
 	@Override
-	public void addBrandShopPDD(BrandInfo brandInfo) {
+	public int addBrandShopPDD(BrandInfo brandInfo) {
 		String shopKey = brandInfo.getShopKeyPDD();
 		if (StringUtil.isNullOrEmpty(shopKey))
-			return;
+			return 0;
 		
 		String searchKey = brandInfo.getSearchKeyPDD();
 		if (StringUtil.isNullOrEmpty(searchKey))
@@ -97,7 +98,7 @@
 		pddfilter.setSortType(6);
 		pddfilter.setMerchantType(3);
 		
-		PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter);
+		PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter, Constant.PDD_SEARCH_CUSTOMER_PARAMS);
 		if (result != null && result.getGoodsList() != null && result.getGoodsList().size() > 0) {
 			boolean addShop = true;
 			List<PDDGoodsDetail> goodsList = result.getGoodsList();
@@ -124,7 +125,9 @@
 			brandShop.setShop(shopInfoVO);
 			brandShop.setCreateTime(new Date());
 			brandShopCaheDao.insert(brandShop);
+			return 1;
 		}
+		return 0;
 	}
 	
 	

--
Gitblit v1.8.0