From 671a88e789a4cd62851bbdc06bbd13b82b535246 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 29 二月 2024 17:05:46 +0800
Subject: [PATCH] 添加查询钻孔数据,添加缓存时间设置

---
 src/main/java/com/lf/server/service/sys/ReportService.java |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/lf/server/service/sys/ReportService.java b/src/main/java/com/lf/server/service/sys/ReportService.java
index bfa119e..955ad4d 100644
--- a/src/main/java/com/lf/server/service/sys/ReportService.java
+++ b/src/main/java/com/lf/server/service/sys/ReportService.java
@@ -1,7 +1,6 @@
 package com.lf.server.service.sys;
 
 import com.lf.server.entity.all.RedisCacheKey;
-import com.lf.server.entity.all.SettingData;
 import com.lf.server.entity.all.StaticData;
 import com.lf.server.entity.ctrl.CoordinateEntity;
 import com.lf.server.entity.ctrl.CountEntity;
@@ -13,10 +12,8 @@
 import com.lf.server.mapper.sys.ReportMapper;
 import com.lf.server.service.all.RedisService;
 import com.lf.server.service.data.DownloadService;
-import com.lf.server.service.data.PublishService;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.locationtech.jts.geom.Coordinate;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
@@ -134,15 +131,15 @@
     @Override
     public List<CountEntity> countExplorationPoints() {
         String key = RedisCacheKey.dataCountKey("countExplorationPoints");
-//        Object obj = redisService.get(key);
-//        if (obj instanceof List<?>) {
-//            return (List<CountEntity>) obj;
-//        }
+        Object obj = redisService.get(key);
+        if (obj instanceof List<?>) {
+            return (List<CountEntity>) obj;
+        }
 
         List<CountEntity> list = reportMapper.countExplorationPoints();
         if (null != list && list.size() > 0) {
             countExplorationArea(list);
-            redisService.put(key, list, SettingData.CACHE_EXPIRE, TimeUnit.MINUTES);
+            redisService.put(key, list, StaticData.I2, TimeUnit.MINUTES);
         }
 
         return list;

--
Gitblit v1.9.3