|
@@ -0,0 +1,47 @@
|
|
|
|
+package com.winhc.test;
|
|
|
|
+
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
|
+import com.winhc.kafka.KafkaProduce;
|
|
|
|
+import com.winhc.service.EsQueryService;
|
|
|
|
+import com.winhc.service.impl.CaseRelationIncrImpl;
|
|
|
|
+import org.apache.commons.logging.Log;
|
|
|
|
+import org.apache.commons.logging.LogFactory;
|
|
|
|
+import org.junit.Test;
|
|
|
|
+import org.junit.runner.RunWith;
|
|
|
|
+import org.neo4j.driver.Driver;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
+
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @author π
|
|
|
|
+ * @Description:案件关联测试
|
|
|
|
+ * @date 2021/05/17 16:24
|
|
|
|
+ */
|
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
|
+@SpringBootTest
|
|
|
|
+public class TestEsApi {
|
|
|
|
+ Log log = LogFactory.getLog(TestEsApi.class);
|
|
|
|
+ @Autowired
|
|
|
|
+ CaseRelationIncrImpl caseRelationImpl;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ Driver driver;
|
|
|
|
+ @Autowired
|
|
|
|
+ KafkaProduce kafkaProduce;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ EsQueryService esQueryService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void testEs() {
|
|
|
|
+ String human_pid = "p1fced228c8a568e7184372831f8e74b8";
|
|
|
|
+ Integer count = esQueryService.queryByDsl(human_pid);
|
|
|
|
+ System.out.println(count);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|