| | |
| | | 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;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | 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<>();
|