From 4a05f1c9c508ab7f10c5eae22a5c716f5454ca02 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期二, 12 三月 2019 16:29:55 +0800
Subject: [PATCH] 冲突提交

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java
index a0e3225..791d4e8 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java
@@ -1,5 +1,6 @@
 package com.yeshi.fanli.service.impl.push;
 
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
@@ -134,6 +135,11 @@
 		if (pushCoupon == null) {
 			throw new PushCouponException(1, "鎺ㄩ�佷俊鎭凡涓嶅瓨鍦�");
 		}
+		
+		if(pushCoupon.isPushed()) {
+			throw new PushCouponException(1, "璇ヤ俊鎭笉鑳介噸澶嶆帹閫�");
+		}
+		
 
 		String title = pushCoupon.getTitle();
 		String content = pushCoupon.getContent();
@@ -141,11 +147,15 @@
 			throw new PushCouponException(1, "鏍囬鎴栧唴瀹逛笉鑳戒负绌�");
 		}
 		
-		
+		List<String> listVersion = null;
+		String versions = pushCoupon.getVersions();
+		if (versions != null && versions.trim().length() > 0) {
+			listVersion  = Arrays.asList(versions.split(","));
+		}
 		String uids = pushCoupon.getUids();
 		if (uids == null || uids.trim().length() == 0) {
 			// 鍏ㄦ帹
-			pushService.pushWelfareCenter(null, title, content);
+			pushService.pushWelfareCenter(null, title, content, listVersion);
 			
 		} else {
 			// 鎸囧畾鐢ㄦ埛鎺ㄩ��
@@ -155,7 +165,7 @@
 				for (int i = 0; i < uidArray.length; i++) {
 					String str_uid = uidArray[i];
 					if (str_uid != null && str_uid.trim().length() > 0) {
-						pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content);
+						pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listVersion);
 					}
 				}
 			}

--
Gitblit v1.8.0