From 1bcfd2d6949bff749cec105f2f56d107edb519e5 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 14 三月 2019 10:48:19 +0800
Subject: [PATCH] 增加配置信息

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 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 3d49b7b..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;
 
@@ -124,7 +125,6 @@
 			// 鏇存柊鏁版嵁
 			updateByPrimaryKey(current);
 		}
-
 	}
 
 	@Override
@@ -135,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();
@@ -142,14 +147,15 @@
 			throw new PushCouponException(1, "鏍囬鎴栧唴瀹逛笉鑳戒负绌�");
 		}
 		
-		
-		// TODO 鎺ㄩ�佽烦杞�
-		
-		
+		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.pushZNX(null, title, content);
+			pushService.pushWelfareCenter(null, title, content, listVersion);
 			
 		} else {
 			// 鎸囧畾鐢ㄦ埛鎺ㄩ��
@@ -159,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.pushZNX(Long.parseLong(str_uid), title, content);
+						pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listVersion);
 					}
 				}
 			}

--
Gitblit v1.8.0