|
@@ -34,13 +34,13 @@ public class FootTimer {
|
|
private IGroupDuckInfoService duckInfoService;
|
|
private IGroupDuckInfoService duckInfoService;
|
|
|
|
|
|
|
|
|
|
- @Scheduled(cron = "0 */5 * * * ?")
|
|
|
|
|
|
+ @Scheduled(cron = "0 0 * * * ?")
|
|
private void saveOnlineDevice(){
|
|
private void saveOnlineDevice(){
|
|
GroupThreshold groupThreshold = thresholdService.getById(1);
|
|
GroupThreshold groupThreshold = thresholdService.getById(1);
|
|
List<GroupDuckInfo> duckInfoList = duckInfoService.list(new QueryWrapper<GroupDuckInfo>().eq("is_leave", 0));
|
|
List<GroupDuckInfo> duckInfoList = duckInfoService.list(new QueryWrapper<GroupDuckInfo>().eq("is_leave", 0));
|
|
for (GroupDuckInfo groupDuckInfo : duckInfoList) {
|
|
for (GroupDuckInfo groupDuckInfo : duckInfoList) {
|
|
String deviceCode = groupDuckInfo.getDeviceCode();
|
|
String deviceCode = groupDuckInfo.getDeviceCode();
|
|
- int countAdvise = groupAdviseService.count(new QueryWrapper<GroupAdvise>().eq("device_code", deviceCode).ge("create_time", DateUtil.offsetDay(new Date(),-10)));
|
|
|
|
|
|
+ int countAdvise = groupAdviseService.count(new QueryWrapper<GroupAdvise>().eq("device_code", deviceCode).ge("create_time", DateUtil.offsetDay(new Date(),-1)));
|
|
if (countAdvise >0){
|
|
if (countAdvise >0){
|
|
return;
|
|
return;
|
|
}
|
|
}
|