From c0f13add249efc60e02ea4a306ab0b464ed69353 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期日, 28 四月 2019 11:52:47 +0800
Subject: [PATCH] 品牌商品优化

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/BrandController.java |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/BrandController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/BrandController.java
index 63ca51b..1291be0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/BrandController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/BrandController.java
@@ -164,6 +164,22 @@
 				for (TaoBaoShopHistory history : listHistory) {
 					TaoBaoShop taoBaoShop = history.getTaoBaoShop();
 					if (taoBaoShop != null) {
+						
+						String shopLink = taoBaoShop.getShopLink();
+						if (StringUtil.isNullOrEmpty(shopLink)) {
+							taoBaoShop.setShopLink(TaoBaoUtil.getShopLink(taoBaoShop.getId()));
+						}
+						
+						String shopNameCustom = taoBaoShop.getShopNameCustom();
+						if (!StringUtil.isNullOrEmpty(shopNameCustom)) {
+							taoBaoShop.setShopName(shopNameCustom);
+						}
+						
+						String shopIconCustom = taoBaoShop.getShopIconCustom();
+						if (!StringUtil.isNullOrEmpty(shopIconCustom)) {
+							taoBaoShop.setShopIcon(shopIconCustom);
+						}
+						
 						list.add(taoBaoShop);
 					}
 				}
@@ -215,7 +231,20 @@
 				if (taoBaoShop == null) {
 					out.print(JsonUtil.loadFalseResult("搴楅摵淇℃伅鑾峰彇澶辫触"));
 				}
-				taoBaoShop.setShopLink(TaoBaoUtil.getShopLink(taoBaoShop.getId()));
+				String shopLink = taoBaoShop.getShopLink();
+				if (StringUtil.isNullOrEmpty(shopLink)) {
+					taoBaoShop.setShopLink(TaoBaoUtil.getShopLink(taoBaoShop.getId()));
+				}
+				
+				String shopNameCustom = taoBaoShop.getShopNameCustom();
+				if (!StringUtil.isNullOrEmpty(shopNameCustom)) {
+					taoBaoShop.setShopName(shopNameCustom);
+				}
+				
+				String shopIconCustom = taoBaoShop.getShopIconCustom();
+				if (!StringUtil.isNullOrEmpty(shopIconCustom)) {
+					taoBaoShop.setShopIcon(shopIconCustom);
+				}
 				data.put("shop", taoBaoShop);
 			}
 

--
Gitblit v1.8.0