From 54e6398cabe1b32b1dbc9857c6a99d8f15b549f7 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 06 十一月 2019 15:31:44 +0800
Subject: [PATCH] 红包信息

---
 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