diff --git a/HomeWork-common/HomeWork-common-core/src/main/java/HomeWork/common/core/constant/ServiceNameConstants.java b/HomeWork-common/HomeWork-common-core/src/main/java/HomeWork/common/core/constant/ServiceNameConstants.java
index 63abb97..2da99a8 100644
--- a/HomeWork-common/HomeWork-common-core/src/main/java/HomeWork/common/core/constant/ServiceNameConstants.java
+++ b/HomeWork-common/HomeWork-common-core/src/main/java/HomeWork/common/core/constant/ServiceNameConstants.java
@@ -2,7 +2,7 @@ package HomeWork.common.core.constant;
/**
* 服务名称
- *
+ *
* @author ruoyi
*/
public class ServiceNameConstants
@@ -21,4 +21,6 @@ public class ServiceNameConstants
* 文件服务的serviceid
*/
public static final String FILE_SERVICE = "HomeWork-file";
+
+ public static final String ES_SERVICE = "bawei-es";
}
diff --git a/HomeWork-common/HomeWork-common-security/src/main/java/HomeWork/common/security/annotation/EnableRyFeignClients.java b/HomeWork-common/HomeWork-common-security/src/main/java/HomeWork/common/security/annotation/EnableRyFeignClients.java
index b3b3946..d68344a 100644
--- a/HomeWork-common/HomeWork-common-security/src/main/java/HomeWork/common/security/annotation/EnableRyFeignClients.java
+++ b/HomeWork-common/HomeWork-common-security/src/main/java/HomeWork/common/security/annotation/EnableRyFeignClients.java
@@ -6,7 +6,7 @@ import java.lang.annotation.*;
/**
* 自定义feign注解
* 添加basePackages路径
- *
+ *
* @author ruoyi
*/
@Target(ElementType.TYPE)
@@ -17,7 +17,7 @@ public @interface EnableRyFeignClients
{
String[] value() default {};
- String[] basePackages() default { "HomeWork" };
+ String[] basePackages() default { "HomeWork" , "com.bawei" };
Class>[] basePackageClasses() default {};
diff --git a/HomeWork-modules/HomeWork-MedicalTreatment/src/main/java/HomeWork/service/impl/TreeServiceImpl.java b/HomeWork-modules/HomeWork-MedicalTreatment/src/main/java/HomeWork/service/impl/TreeServiceImpl.java
index 13f53af..3af027a 100644
--- a/HomeWork-modules/HomeWork-MedicalTreatment/src/main/java/HomeWork/service/impl/TreeServiceImpl.java
+++ b/HomeWork-modules/HomeWork-MedicalTreatment/src/main/java/HomeWork/service/impl/TreeServiceImpl.java
@@ -120,5 +120,6 @@ public class TreeServiceImpl implements TreeService {
treeVos.add(treeVo1);
}
return treeVos;
- }
+ }/**/
+
}
diff --git a/HomeWork-modules/HomeWork-es/base-es-common/pom.xml b/HomeWork-modules/HomeWork-es/base-es-common/pom.xml
new file mode 100644
index 0000000..e27ce94
--- /dev/null
+++ b/HomeWork-modules/HomeWork-es/base-es-common/pom.xml
@@ -0,0 +1,23 @@
+
+
+ 4.0.0
+
+ HomeWork
+ base-es
+ 3.6.3
+
+
+ base-es-common
+
+
+
+
+ HomeWork
+ HomeWork-common-core
+
+
+
+
+
diff --git a/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/BasePage.java b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/BasePage.java
new file mode 100644
index 0000000..f9658c8
--- /dev/null
+++ b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/BasePage.java
@@ -0,0 +1,14 @@
+package com.bawei.es.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel("分页")
+@Data
+public class BasePage {
+ @ApiModelProperty(value = "页码",required = true)
+ private Integer pageNum;
+ @ApiModelProperty(value = "每页数量",required = true)
+ private Integer pageSize;
+}
diff --git a/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocInfoReq.java b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocInfoReq.java
new file mode 100644
index 0000000..5a71cd7
--- /dev/null
+++ b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocInfoReq.java
@@ -0,0 +1,4 @@
+package com.bawei.es.domain;
+
+public class DocInfoReq {
+}
diff --git a/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/Document.java b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/Document.java
new file mode 100644
index 0000000..4af4fa3
--- /dev/null
+++ b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/Document.java
@@ -0,0 +1,16 @@
+package com.bawei.es.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel("文档")
+public class Document {
+ @ApiModelProperty(value = "id",required = false)
+ private String id;
+ @ApiModelProperty(value = "姓名",required = false)
+ private String name;
+ @ApiModelProperty(value = "年龄",required = false)
+ private Integer age;
+}
diff --git a/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentDelReq.java b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentDelReq.java
new file mode 100644
index 0000000..58c95e7
--- /dev/null
+++ b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentDelReq.java
@@ -0,0 +1,19 @@
+package com.bawei.es.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+@ApiModel("文档删除")
+@Data
+public class DocumentDelReq {
+ @ApiModelProperty(value = "索引名称",required = true)
+ @NotNull(message = "索引名称不能为空")
+ private String indexName;
+ @ApiModelProperty(value = "文档id", required = true)
+ @NotNull(message = "id不能为空")
+ private List ids;
+}
diff --git a/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentListReq.java b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentListReq.java
new file mode 100644
index 0000000..364a5cd
--- /dev/null
+++ b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentListReq.java
@@ -0,0 +1,26 @@
+package com.bawei.es.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+@Data
+@ApiModel("文档查询")
+public class DocumentListReq {
+
+ @ApiModelProperty(value = "索引名称",required = true)
+ @NotNull(message = "索引名称不能为空")
+ private String indexName;
+ @ApiModelProperty(value = "全文检索", required = false)
+ private String keyWord;
+ @ApiModelProperty(value = "分页参数", required = false)
+ private BasePage basePage;
+ @ApiModelProperty("检索字段")
+ private List queryFields;
+ @ApiModelProperty("返回字段")
+ private List returnFields;
+
+}
diff --git a/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentReq.java b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentReq.java
new file mode 100644
index 0000000..93bc308
--- /dev/null
+++ b/HomeWork-modules/HomeWork-es/base-es-common/src/main/java/com/bawei/es/domain/DocumentReq.java
@@ -0,0 +1,26 @@
+package com.bawei.es.domain;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+import java.util.Map;
+
+@Data
+@Api(tags = "文档索引")
+public class DocumentReq {
+ @ApiModelProperty(value = "索引名称",required = true)
+ @NotNull(message = "索引名称不能为空")
+ private String indexName;
+
+ @ApiModelProperty(value = "是否制定文档ID")
+ private boolean isNeedId = false;
+
+ @ApiModelProperty(value = "文档ID对应字段")
+ private String idField;
+
+ @ApiModelProperty(value = "文档内容")
+ private List