From 4114e871bcb3dce771b6aed64a1027d0bbb95ca6 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 16 五月 2019 15:28:37 +0800
Subject: [PATCH] 增加动态用户

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java |   22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java
index 1225be7..e48dfb2 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java
@@ -62,7 +62,7 @@
 	private PushService pushService;
 
 	@Resource
-	private PushGoodsService PushGoodsService;
+	private PushGoodsService pushGoodsService;
 
 	@Resource
 	private PushGoodsGroupService pushGoodsGroupService;
@@ -81,7 +81,8 @@
 
 	@RequestMapping(value = "callback", method = RequestMethod.POST)
 	public void callback(AcceptData acceptData, String pushId, PrintWriter out) {
-		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages());
+		BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
+				acceptData.getPackages());
 		if (system == null) {
 			out.print(JsonUtil.loadFalseResult("涓嶅瓨鍦ㄨ绯荤粺"));
 			return;
@@ -106,12 +107,6 @@
 	public void insertIOSDeviceToken(AcceptData acceptData, String deviceToken, PrintWriter out) {
 		if (!StringUtil.isNullOrEmpty(acceptData.getDevice()) && !StringUtil.isNullOrEmpty(deviceToken)) {
 			// 娣诲姞璁惧娲昏穬璁板綍
-			DeviceActive da = new DeviceActive();
-			da.setDeviceToken(deviceToken);
-			da.setPlatform(DeviceActive.PLATFORM_IOS);
-			da.setVersionCode(Integer.parseInt(acceptData.getVersion()));
-			da.setDevice(acceptData.getDevice());
-			deviceActiveService.addDeviceActive(da);
 			iosPushService.addDeviceToken(null, Integer.parseInt(acceptData.getVersion()), deviceToken,
 					acceptData.getDevice());
 			out.print(JsonUtil.loadTrue(0, null, "鎴愬姛"));
@@ -129,13 +124,6 @@
 	@RequestMapping(value = "/uidBindDeviceToken", method = RequestMethod.POST)
 	public void uidBindIOSDeviceToken(AcceptData acceptData, Long uid, String deviceToken, PrintWriter out) {
 		if (uid != null && uid != 0 && !StringUtil.isNullOrEmpty(deviceToken)) {
-			// 娣诲姞璁惧娲昏穬璁板綍
-			DeviceActive da = new DeviceActive();
-			da.setDeviceToken(deviceToken);
-			da.setPlatform(DeviceActive.PLATFORM_IOS);
-			da.setVersionCode(Integer.parseInt(acceptData.getVersion()));
-			da.setDevice(acceptData.getDevice());
-			deviceActiveService.addDeviceActive(da);
 			// 娣诲姞token
 			iosPushService.addDeviceToken(uid, Integer.parseInt(acceptData.getVersion()), deviceToken,
 					acceptData.getDevice());
@@ -204,11 +192,11 @@
 
 			// 璁惧娉ㄥ唽鏃堕棿
 			Date createTime = deviceActive.getCreateTime();
-			count = PushGoodsService.countHistoryByPushTime(uid, createTime);
+			count = pushGoodsService.countHistoryByPushTime(uid, createTime);
 
 			int pageSize = Constant.PAGE_SIZE;
 
-			list = PushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, uid, createTime);
+			list = pushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, uid, createTime);
 			if (list != null && list.size() > 0) {
 				for (PushGoods pushGoods : list) {
 					JSONObject result = new JSONObject();

--
Gitblit v1.8.0