From dc5be7d38446f70e6ff86df311119c32b41fe7f8 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 28 十一月 2020 16:37:05 +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