|
@@ -4,6 +4,9 @@ import cn.hutool.core.io.FileUtil;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
|
+import com.fdkankan.elasticsearch.service.DocumentService;
|
|
|
|
+import com.fdkankan.elasticsearch.service.IndexService;
|
|
|
|
+import com.fdkankan.elasticsearch.service.QueryDataService;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.manage.common.OssPath;
|
|
import com.fdkankan.manage.common.OssPath;
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
@@ -18,6 +21,7 @@ import com.fdkankan.manage.service.ISceneProService;
|
|
import com.fdkankan.manage.util.Dateutils;
|
|
import com.fdkankan.manage.util.Dateutils;
|
|
import com.fdkankan.manage.util.ExcelUtil;
|
|
import com.fdkankan.manage.util.ExcelUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.elasticsearch.rest.RestStatus;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -39,13 +43,35 @@ public class TestController {
|
|
FYunFileServiceInterface fYunFileServiceInterface;
|
|
FYunFileServiceInterface fYunFileServiceInterface;
|
|
@Autowired
|
|
@Autowired
|
|
ICameraService cameraService;
|
|
ICameraService cameraService;
|
|
|
|
+ @Autowired
|
|
|
|
+ IndexService indexService;
|
|
|
|
+ @Autowired
|
|
|
|
+ QueryDataService queryDataService;
|
|
|
|
+ @Autowired
|
|
|
|
+ DocumentService documentService;
|
|
|
|
|
|
@RequestMapping("/test")
|
|
@RequestMapping("/test")
|
|
public ResultData test(@RequestParam(required = false) String oldSnCode,
|
|
public ResultData test(@RequestParam(required = false) String oldSnCode,
|
|
@RequestParam(required = false)String newSnCode,
|
|
@RequestParam(required = false)String newSnCode,
|
|
- @RequestParam(required = false)String dataSource){
|
|
|
|
|
|
+ @RequestParam(required = false)String dataSource) throws Exception {
|
|
|
|
|
|
- return ResultData.ok();
|
|
|
|
|
|
+// RestStatus restStatus = documentService.addDocument("abc-test1", null, "1", "{\n" +
|
|
|
|
+// " \"appId\": \"7b5958d5-1ae6-4ad5-8a87-5fc8a4b92999\",\n" +
|
|
|
|
+// " \"module\": \"module\",\n" +
|
|
|
|
+// " \"userId\": null,\n" +
|
|
|
|
+// " \"time\": 1662519289298,\n" +
|
|
|
|
+// " \"url\": \"/#/roam\",\n" +
|
|
|
|
+// " \"urlParam\": null,\n" +
|
|
|
|
+// " \"requestData\": {\n" +
|
|
|
|
+// " \"screen\": \"1920x1080\",\n" +
|
|
|
|
+// " \"click\": \"filter\",\n" +
|
|
|
|
+// " \"user\": \"\",\n" +
|
|
|
|
+// " \"version\": \"1\"\n" +
|
|
|
|
+// " }}");
|
|
|
|
+// log.info("{}",restStatus);
|
|
|
|
+ List<String> strings = queryDataService.boolQuery("abc-test1", String.class);
|
|
|
|
+
|
|
|
|
+ return ResultData.ok(JSONObject.toJSONString(strings));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|