list = new ArrayList<>();
+// TopFieldCollector collector = TopFieldCollector.create(sort, 20000, 0);
+// searcher.search(booleanQueryBuilder.build(), collector);
+// docs = collector.topDocs(pageNum*pageSize, pageSize);
+// ScoreDoc[] scoreDocs = docs.scoreDocs;
+// int totalSize = collector.getTotalHits();
+//
+// for (ScoreDoc scoreDoc : scoreDocs) {
+// Document doc = reader.document(scoreDoc.doc);
+// String logInfo = LogMessageConstant.COLOR_RED + doc.get(LogMessageConstant.FIELD_TIMESTAMP) +
+// LogMessageConstant.COLOR_RESET + " - " +
+// LogMessageConstant.COLOR_BLUE + doc.get(LogMessageConstant.FIELD_IP) +
+// LogMessageConstant.COLOR_RESET + " - " +
+// LogMessageConstant.COLOR_GREEN + "[" + doc.get(LogMessageConstant.FIELD_THREAD) + "]" +
+// LogMessageConstant.COLOR_RESET + " - " +
+// LogMessageConstant.COLOR_BLACK + doc.get(LogMessageConstant.FIELD_LEVEL) +
+// LogMessageConstant.COLOR_RESET + " - " +
+// LogMessageConstant.COLOR_MAGENTA + doc.get(LogMessageConstant.FIELD_CLASS_NAME) +
+// LogMessageConstant.COLOR_RESET + " - " +
+// LogMessageConstant.COLOR_GREEN + "<" + doc.get(LogMessageConstant.FIELD_TRACEID) + ">" +
+// LogMessageConstant.COLOR_RESET + " - " +
+// LogMessageConstant.COLOR_BLACK + highlightKeyword(doc.get(LogMessageConstant.FIELD_MESSAGE), whereJson.getString("message"));
+// list.add(logInfo);
+// }
+// reader.close();
+// JSONObject jo = new JSONObject();
+// jo.put("content", list);
+// jo.put("totalElements", totalSize);
+// return jo;
+// }
+//
+// public static String highlightKeyword(String text, String keyword) {
+// if (ObjectUtil.isEmpty(keyword)) {
+// return text;
+// }
+//
+// int startIndex = text.indexOf(keyword);
+// if (startIndex != -1) {
+// int endIndex = startIndex + keyword.length();
+// String beforeKeyword = text.substring(0, startIndex);
+// String afterKeyword = text.substring(endIndex);
+// String highlightedKeyword = LogMessageConstant.BACKGROUND_YELLOW + keyword + LogMessageConstant.COLOR_RESET
+// + LogMessageConstant.COLOR_BLACK;
+// return beforeKeyword + highlightedKeyword + afterKeyword;
+// } else {
+// return text;
+// }
+// }
+//
+// public static void main(String[] args) throws IOException, ParseException {
+// // 获取当前时间
+// LocalDateTime now = LocalDateTime.now();
+// // 减去七天
+// LocalDateTime sevenDaysAgo = now.minus(7, ChronoUnit.DAYS);
+// // 转换为 Date 类型
+// Date sevenDaysAgoDate = Date.from(sevenDaysAgo.atZone(ZoneId.systemDefault()).toInstant());
+// // 获取时间戳
+// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
+// Date date = dateFormat.parse(String.valueOf(sevenDaysAgo));
+// long timestamp = date.getTime();
+// System.out.println(now);
+// System.out.println(sevenDaysAgo);
+// System.out.println(sevenDaysAgoDate);
+// System.out.println(timestamp);
+// }
+//}
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java b/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java
index dd38082..8d102eb 100644
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java
+++ b/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java
@@ -1,18 +1,15 @@
package org.nl.system.controller.lucence;
import com.alibaba.fastjson.JSONObject;
-
-
-import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.nl.common.logging.annotation.Log;
-import org.nl.system.service.lucene.LuceneService;
-import org.springframework.data.domain.Pageable;
+import org.nl.system.service.lucene.EsLogService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Map;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
/**
*
@@ -23,20 +20,20 @@ import java.util.Map;
* @since 2023-11-16
*/
@RestController
-@RequiredArgsConstructor
@RequestMapping("/api/lucene")
@Slf4j
public class LuceneController {
- private final LuceneService luceneService;
+ @Autowired
+ private EsLogService esLogService;
@PostMapping("/getAll")
public ResponseEntity