From 4d7db6fd66f5b2c9cae9954e46314f9711ce1e8f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 06 十一月 2019 18:51:40 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java
index 86d26c3..d6be2b0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandGoodsCaheServiceImpl.java
@@ -68,6 +68,10 @@
 	 * @return
 	 */
 	private int addBrandGoodsTB(BrandInfo brandInfo) {
+		String shopKey = brandInfo.getShopKey();
+		if (StringUtil.isNullOrEmpty(shopKey))
+			shopKey = brandInfo.getName();
+		
 		String searchKey = brandInfo.getSearchKey();
 		if (StringUtil.isNullOrEmpty(searchKey))
 			searchKey = brandInfo.getName();
@@ -94,8 +98,8 @@
 				// 娣诲姞搴楅摵
 				String shopTitle = goods.getShopTitle();
 				if (addShop && !StringUtil.isNullOrEmpty(shopTitle) && shopTitle.contains("鏃楄埌搴�") 
-						&& shopTitle.contains(brandInfo.getName())) {
-					addShop = brandShopCaheService.addBrandShopTB(brandInfo.getId(), goods.getAuctionId(),
+						&& shopTitle.toLowerCase().contains(shopKey.toLowerCase())) {
+					addShop = brandShopCaheService.addBrandShopTB(brandInfo, goods.getAuctionId(),
 							goods.getSellerId());
 				}
 				
@@ -129,6 +133,10 @@
 	 * @return
 	 */
 	private int addBrandGoodsJD(BrandInfo brandInfo) {
+		String shopKey = brandInfo.getShopKey();
+		if (StringUtil.isNullOrEmpty(shopKey))
+			shopKey = brandInfo.getName();
+		
 		String searchKey = brandInfo.getSearchKey();
 		if (StringUtil.isNullOrEmpty(searchKey))
 			searchKey = brandInfo.getName();
@@ -178,7 +186,7 @@
 					if (addShop && shopInfo != null) {
 						// 鍖呭惈璇ュ搧鐗屽悕绉�
 						String shopName = shopInfo.getShopName();
-						if (!StringUtil.isNullOrEmpty(shopName) && shopName.contains(brandInfo.getName())) {
+						if (!StringUtil.isNullOrEmpty(shopName) && shopName.toLowerCase().contains(shopKey.toLowerCase())) {
 							addShop = false;
 							brandShopCaheService.addBrandShopJD(brandInfo, shopInfo);
 						}

--
Gitblit v1.8.0