From b6c37e4bc38db88a360d0f2c6099183f9bb75bdc Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期一, 22 四月 2019 14:31:59 +0800
Subject: [PATCH] 券推送插入

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 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 781d20b..c18d7fd 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
@@ -8,10 +8,10 @@
 import java.util.UUID;
 
 import javax.annotation.Resource;
-import javax.transaction.Transactional;
 
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 import org.yeshi.utils.tencentcloud.COSManager;
 
@@ -80,6 +80,8 @@
 		String params = record.getParams();
 		if (params == null || params.trim().length() == 0 || "null".equalsIgnoreCase(params) ) {
 			record.setParams(null);
+		} else if (!StringUtil.isJson(params)) {
+			throw new SwiperPictureException(1, "璺宠浆鍙傛暟闈濲SON鏍煎紡");
 		}
 		
 		if (!StringUtil.isNullOrEmpty(jumpType)) {
@@ -107,6 +109,11 @@
 			e.printStackTrace();
 		}
 		
+		String remark = record.getRemark();
+		if (remark != null && (remark.trim().length() == 0 || remark.equalsIgnoreCase("null"))) {
+			record.setRemark(null);
+		}
+		
 		
 		String picture = null;
 		if (file != null) {

--
Gitblit v1.8.0