From 5c4ecf9e8b47efbbf5d21c9e109be0a60cb7e26d Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期一, 08 四月 2019 15:15:09 +0800
Subject: [PATCH] 冲突解决

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java
index 53ba772..781d20b 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java
@@ -78,7 +78,7 @@
 		}
 		
 		String params = record.getParams();
-		if ((params != null && params.trim().length() == 0) || "null".equalsIgnoreCase(params) ) {
+		if (params == null || params.trim().length() == 0 || "null".equalsIgnoreCase(params) ) {
 			record.setParams(null);
 		}
 		
@@ -233,7 +233,25 @@
 	@Override
 	@Cacheable(value = "bannerCache", key = "'getByBannerCard-'+#card")
 	public List<SwiperPicture> getByBannerCard(String card) throws SwiperPictureException {
-		return swiperPictureMapper.getByBannerCard(card);
+		List<SwiperPicture> list = swiperPictureMapper.getByBannerCard(card);
+		if (list != null && list.size() > 0) {
+			for (SwiperPicture swiperPicture: list) {
+				boolean needLogin = swiperPicture.isJumpNeedLogin();
+				JumpDetailV2 jumpDetail = swiperPicture.getJumpDetail();
+				if (jumpDetail != null) {
+					jumpDetail.setNeedLogin(needLogin);
+					swiperPicture.setJumpDetail(jumpDetail);
+				}
+			}
+		}
+		return list;
+	}
+	
+	
+	@Override
+	@Cacheable(value = "bannerCache", key = "'getByBannerId-'+#bannerId")
+	public List<SwiperPicture> getByBannerId(Long bannerId) throws SwiperPictureException {
+		return swiperPictureMapper.getByBannerId(bannerId);
 	}
 	
 }

--
Gitblit v1.8.0