From 463c527e9c1af2a4e8a98648014215aa130a1ecd Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期二, 29 一月 2019 11:52:34 +0800
Subject: [PATCH] Merge branch 'div'

---
 fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java
index 05f5af6..f059803 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java
@@ -8,9 +8,12 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 
+import com.yeshi.fanli.entity.bus.msg.UserSystemMsg;
+import com.yeshi.fanli.entity.bus.msg.UserSystemMsgTypeEnum;
 import com.yeshi.fanli.exception.PushException;
 import com.yeshi.fanli.service.inter.config.ConfigService;
 import com.yeshi.fanli.service.inter.config.SystemService;
+import com.yeshi.fanli.service.inter.msg.UserSystemMsgService;
 import com.yeshi.fanli.service.inter.push.PushRecordService;
 import com.yeshi.fanli.service.inter.push.PushService;
 import com.yeshi.fanli.service.inter.user.AccountMessageService;
@@ -51,6 +54,9 @@
 
 	@Resource
 	private PushService pushService;
+	
+	@Resource
+	private UserSystemMsgService userSystemMsgService;
 
 	/**
 	 * 鍟嗗搧鎺ㄩ��
@@ -273,12 +279,17 @@
 					String str_uid = uidArray[i];
 					if (str_uid != null && str_uid.trim().length() > 0) {
 						pushService.pushZNX(Long.parseLong(str_uid), title, content);
+						
+						userSystemMsgService.addUserSystemMsg(Long.parseLong(str_uid), 
+								UserSystemMsgTypeEnum.question, title, content, 
+								UserSystemMsg.TIME_TAG_EMERGENT, null);
 					}
 				}
 			}
-			
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎺ㄩ�佹垚鍔�"));
 		} catch (PushException e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎺ㄩ�佸け璐�"));
+		} catch (Exception e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎺ㄩ�佸け璐�"));
 			e.printStackTrace();
 		}
@@ -324,6 +335,8 @@
 			
 		} catch (PushException e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎺ㄩ�佸け璐�"));
+		} catch (Exception e) {
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎺ㄩ�佸け璐�"));
 			e.printStackTrace();
 		}
 	}

--
Gitblit v1.8.0