From ca1ad791b7b7b04e57db6bd4fb93f0c1066a9f99 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 24 九月 2020 18:31:23 +0800
Subject: [PATCH] 淘口令格式兼容
---
fanli/src/main/java/com/yeshi/fanli/service/impl/push/OPPOPushServiceImpl.java | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/OPPOPushServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/OPPOPushServiceImpl.java
index c6a8b8b..cac79b3 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/OPPOPushServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/OPPOPushServiceImpl.java
@@ -1,15 +1,12 @@
package com.yeshi.fanli.service.impl.push;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
import javax.annotation.Resource;
import com.yeshi.fanli.dto.push.PushBaseContent;
import com.yeshi.fanli.entity.SystemEnum;
+import com.yeshi.fanli.util.Constant;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -156,11 +153,12 @@
}
if (uid == null || uid == 0) {
+ Date minUpdatetime=new Date(System.currentTimeMillis()- Constant.PUSH_MIN_TIME);
int pageSize = 200;
- long deviceCount = deviceTokenOPPOService.countDeviceToken(newVersionList);
+ long deviceCount = deviceTokenOPPOService.countDeviceToken(newVersionList,minUpdatetime);
int page = (int) (deviceCount % pageSize == 0 ? deviceCount / pageSize : deviceCount / pageSize + 1);
for (int p = 1; p <= page; p++) {
- List<DeviceTokenOPPO> deviceList = deviceTokenOPPOService.listDeviceToken(p, pageSize, newVersionList);
+ List<DeviceTokenOPPO> deviceList = deviceTokenOPPOService.listDeviceToken(p, pageSize, newVersionList,minUpdatetime);
deviceList = filterDeviceToken(deviceList, hour);
List<String> tokenList = new ArrayList<>();
--
Gitblit v1.8.0