rev:日志修改(未完成)
This commit is contained in:
@@ -5,8 +5,6 @@ import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.modules.loki.service.LokiService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@@ -16,13 +14,12 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class LokiServiceImpl implements LokiService {
|
||||
public class LokiServiceImpl {
|
||||
|
||||
private String lokiUrl;
|
||||
|
||||
private String systemName;
|
||||
|
||||
@Override
|
||||
public JSONObject getLogData(JSONObject json) {
|
||||
String logLabel = "";
|
||||
String logLabelValue = "";
|
||||
@@ -68,7 +65,6 @@ public class LokiServiceImpl implements LokiService {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JSONArray getLabelsValues() {
|
||||
/**
|
||||
* [{
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.lucene.common.Searcher;
|
||||
import org.nl.modules.lucene.service.LuceneService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -30,7 +29,6 @@ public class LuceneServiceImpl implements LuceneService {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JSONArray getLabelsValues() {
|
||||
JSONArray result = new JSONArray();
|
||||
// 获取所有标签
|
||||
@@ -64,7 +62,7 @@ public class LuceneServiceImpl implements LuceneService {
|
||||
public Map<String, Object> getAll(Map whereJson, Pageable page) {
|
||||
JSONObject jo = new JSONObject();
|
||||
try {
|
||||
JSONObject jsonObject = (JSONObject) Searcher.search(luceneUrl, "", whereJson);
|
||||
JSONObject jsonObject = null;//(JSONObject) Searcher.search(luceneUrl, "", whereJson);
|
||||
JSONArray array = jsonObject.getJSONArray("content");
|
||||
int totalElements = Integer.parseInt(jsonObject.get("totalElements").toString());
|
||||
jo.put("content", array);
|
||||
|
||||
Reference in New Issue
Block a user