diff --git a/stwzhj-modules/wzhj-extract/src/main/resources/mapper/DeviceGpsMapper.xml b/stwzhj-modules/wzhj-extract/src/main/resources/mapper/DeviceGpsMapper.xml
index 4d288843..7125109a 100644
--- a/stwzhj-modules/wzhj-extract/src/main/resources/mapper/DeviceGpsMapper.xml
+++ b/stwzhj-modules/wzhj-extract/src/main/resources/mapper/DeviceGpsMapper.xml
@@ -52,6 +52,7 @@
select indexcode deviceCode,'5' deviceType, longitude lng, latitude lat,to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') gpsTime from public.mobileposition_view
and to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') > #{gpsTime}
+ and to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') <= now()
order by updatatime desc
diff --git a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/controller/system/IndexStaticsController.java b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/controller/system/IndexStaticsController.java
index 0bc1caa7..ae010bcd 100644
--- a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/controller/system/IndexStaticsController.java
+++ b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/controller/system/IndexStaticsController.java
@@ -4,6 +4,7 @@ package org.dromara.system.controller.system;
import cn.hutool.core.date.DateUtil;
import jdk.dynalink.linker.LinkerServices;
import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.common.core.domain.R;
import org.dromara.common.redis.utils.RedisUtils;
@@ -24,6 +25,7 @@ import java.util.*;
@RequiredArgsConstructor
@RestController
+@Slf4j
public class IndexStaticsController extends BaseController {
private final ISysDeptService deptService;
@@ -90,7 +92,7 @@ public class IndexStaticsController extends BaseController {
/*
* 通过ES来监听各类设备定位是否正常
* */
- @Scheduled(cron = "0 */30 * * * ?")
+// @Scheduled(cron = "0 */30 * * * ?")
public void listen(){
List strs = elasticSearchService.linstenDataStatus();
if (strs.size() >0){
@@ -105,8 +107,9 @@ public class IndexStaticsController extends BaseController {
noticeService.insertNotice(noticeBo);
}
+ }
}
- }
+
/*
* 各地市总数和在线数
diff --git a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java
index d9032267..98169d3a 100644
--- a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java
+++ b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java
@@ -39,7 +39,7 @@ public class DeviceRedisSchedule {
/*
* 把Redis中 online_user数据存入t_device_redis表中
* */
- @Scheduled(cron = "0/30 * * * * ?")
+// @Scheduled(cron = "0/30 * * * * ?")
public void handleDeviceRedis(){
List jlist = RedisUtils.searchAndGetKeysValues("online_users:*");
redisService.insertBatch(BeanUtil.copyToList(jlist, DeviceRedis.class));
@@ -81,7 +81,7 @@ public class DeviceRedisSchedule {
/*
* 定时删除设备状态为删除的定位信息和在线表
* */
-// @Scheduled(cron = "0 0 0/1 * * ?")
+ @Scheduled(cron = "0 0 0/1 * * ?")
public void removeRedis(){
deviceService.deleteRedis();
}