Browse Source

井筒-索引管理

xiaoqiao 1 year ago
parent
commit
13ea618f9e
28 changed files with 6654 additions and 1205 deletions
  1. 58 0
      doc/待更新脚本
  2. 1463 599
      lib/华北油田Ai检索.PDM
  3. 1468 604
      lib/华北油田Ai检索.pdb
  4. 130 0
      src/main/java/com/bowintek/practice/controller/EsIndexController.java
  5. 30 0
      src/main/java/com/bowintek/practice/mapper/EsIndexMapper.java
  6. 30 0
      src/main/java/com/bowintek/practice/mapper/EsIndexfieldMapper.java
  7. 12 0
      src/main/java/com/bowintek/practice/mapper/cquery/EsIndexCquery.java
  8. 105 0
      src/main/java/com/bowintek/practice/model/EsIndex.java
  9. 860 0
      src/main/java/com/bowintek/practice/model/EsIndexExample.java
  10. 103 0
      src/main/java/com/bowintek/practice/model/EsIndexfield.java
  11. 859 0
      src/main/java/com/bowintek/practice/model/EsIndexfieldExample.java
  12. 155 0
      src/main/java/com/bowintek/practice/services/impl/EsIndexServiceImpl.java
  13. 17 0
      src/main/java/com/bowintek/practice/services/service/EsIndexService.java
  14. 9 0
      src/main/java/com/bowintek/practice/vo/EsIndexVo.java
  15. 12 0
      src/main/java/com/bowintek/practice/vo/EsIndexfieldVo.java
  16. 2 1
      src/main/resources/generatorConfig.xml
  17. 291 0
      src/main/resources/mapping/EsIndexMapper.xml
  18. 291 0
      src/main/resources/mapping/EsIndexfieldMapper.xml
  19. 27 0
      src/main/resources/mapping/cquery/EsIndexCQuery.xml
  20. BIN
      src/main/resources/static/doc/template/主题字段导入模板.xlsx
  21. BIN
      src/main/resources/static/doc/template/索引字段导入模板.xlsx
  22. 2 1
      target/classes/generatorConfig.xml
  23. 3 0
      vue/src/router/asyncModules/sale.ts
  24. 112 0
      vue/src/views/esindex/detail.vue
  25. 245 0
      vue/src/views/esindex/edit.vue
  26. 160 0
      vue/src/views/esindex/fieldedit.vue
  27. 192 0
      vue/src/views/esindex/index.vue
  28. 18 0
      vue/src/views/esindex/model.ts

+ 58 - 0
doc/待更新脚本

@@ -6,3 +6,61 @@
  VALUES ('T010401', 1, '领域检索', null, 'views/domain', '/domain/index', 'T0104', null, 0, 0, 1, 'T0104', 1, null);
  INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
  VALUES ('T010402', 2, '领域检索结果', null, 'views/domainResult', '/domain/result', 'T0104', null, 0, 0, 1, 'T0104', 1, null);
+
+
+ INSERT INTO sys_function_code (FunctionCode, FunctionName, ParentFunctionCode, OrderNo) VALUES ('T0109', '索引定义', 'T01', 9);
+ INSERT INTO sys_function_code (FunctionCode, FunctionName, ParentFunctionCode, OrderNo) VALUES ('T010900', '查看', 'T0109', 0);
+ INSERT INTO sys_function_code (FunctionCode, FunctionName, ParentFunctionCode, OrderNo) VALUES ('T010901', '新增', 'T0109', 1);
+ INSERT INTO sys_function_code (FunctionCode, FunctionName, ParentFunctionCode, OrderNo) VALUES ('T010902', '导入', 'T0109', 2);
+ INSERT INTO sys_function_code (FunctionCode, FunctionName, ParentFunctionCode, OrderNo) VALUES ('T010903', '编辑', 'T0109', 3);
+ INSERT INTO sys_function_code (FunctionCode, FunctionName, ParentFunctionCode, OrderNo) VALUES ('T010904', '删除', 'T0109', 4);
+
+ INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
+ VALUES ('T0109', 5, '索引定义', 'ReadOutlined', 'views/esindex', '/esindex', 'T01', null, 0, 1, 1, 'T0109', 1, null);
+ INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
+ VALUES ('T010901', 1, '索引管理', '', 'views/esindexlist', '/esindex/list', 'T0109', null, 0, 0, 1, 'T0109', 1, null);
+ INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
+ VALUES ('T010902', 2, '字段定义', '', 'views/esindexedit', '/esindex/edit', 'T0109', null, 0, 0, 1, null, 1, null);
+ INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
+ VALUES ('T010903', 3, '索引详细', '', 'views/esindexdetail', '/esindex/detail', 'T0109', null, 0, 0, 1, null, 1, null);
+
+ create table es_index
+ (
+     indexId              varchar(50) not null,
+     indexName            varchar(100) not null comment '索引名称',
+     indexCode            varchar(100) not null comment '索引编码',
+     indexDesc            varchar(200) comment '描述',
+     displayType          int comment '显示类型1、生命周期2、普通表格3、列表4、图表5、文档',
+     createdName          varchar(50) not null comment '创建姓名',
+     createTime           datetime not null comment '创建时间',
+     modiTime             datetime not null,
+     createdBy            varchar(50) not null comment '创建人',
+     status               int not null comment '状态(1 有效/0 无效)',
+     primary key (indexId)
+ );
+
+ create table es_indexField
+ (
+     fieldId              varchar(50) not null,
+     indexId              varchar(50) comment '索引id',
+     fieldCode            varchar(100) not null comment '字段编码',
+     fieldName            varchar(100) not null comment '字段名称',
+     fieldDesc            varchar(200) comment '字段描述',
+     dataType             varchar(20) not null comment '数据类型',
+     queryTypeId          int not null comment '字典表queryType的值1、文本2、数值3、日期4、字典值5、级联选择6、穿梭选择',
+     disOrder             int not null,
+     isSearchField        int not null comment '1、是0、否 如是1则自助检索页面显示',
+     isDisplay            int comment '1、显示0、隐藏',
+     primary key (fieldId)
+ );
+
+ alter table es_indexField add constraint FK_Reference_33 foreign key (indexId)
+     references es_index (indexId) on delete restrict on update restrict;
+
+
+ insert into sys_dictionary value('displayType','索引显示类型',1,1);
+ insert into sys_dictionary_item values (uuid(),'','displayType',1,'生命周期',1,1,1);
+ insert into sys_dictionary_item values (uuid(),'','displayType',2,'表格',2,1,1);
+ insert into sys_dictionary_item values (uuid(),'','displayType',3,'列表',3,1,1);
+ insert into sys_dictionary_item values (uuid(),'','displayType',4,'图表',4,1,1);
+ insert into sys_dictionary_item values (uuid(),'','displayType',5,'文档',5,1,1);

File diff suppressed because it is too large
+ 1463 - 599
lib/华北油田Ai检索.PDM


File diff suppressed because it is too large
+ 1468 - 604
lib/华北油田Ai检索.pdb


+ 130 - 0
src/main/java/com/bowintek/practice/controller/EsIndexController.java

@@ -0,0 +1,130 @@
+package com.bowintek.practice.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.bowintek.practice.filter.exception.BaseErrorEnum;
+import com.bowintek.practice.filter.exception.BaseResponse;
+import com.bowintek.practice.filter.exception.RespGenerstor;
+import com.bowintek.practice.services.service.AccountService;
+import com.bowintek.practice.services.service.EsIndexService;
+import com.bowintek.practice.services.service.UserService;
+import com.bowintek.practice.util.DateUtils;
+import com.bowintek.practice.util.ExcelHelper;
+import com.bowintek.practice.util.StringUtils;
+import com.bowintek.practice.vo.EsIndexVo;
+import com.bowintek.practice.vo.EsIndexfieldVo;
+import com.bowintek.practice.vo.user.UserInfoModel;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@RestController
+@RequestMapping(value = "/api/esindex")
+public class EsIndexController {
+
+    @Autowired
+    private EsIndexService esIndexService;
+    @Autowired
+    private AccountService accountService;
+    @Autowired
+    private DateUtils dateUtils;
+    @Autowired
+    private StringUtils stringUtils;
+    @Autowired
+    private UserService userService;
+
+    @ResponseBody
+    @GetMapping("/getList")
+    public BaseResponse<PageInfo<EsIndexVo>> getList(@RequestParam("page") int page, @RequestParam("rows") int rows,
+                                                     String indexName, String indexCode) throws Exception {
+
+        PageInfo<EsIndexVo> result = esIndexService.getList(page, rows, indexName, indexCode, null);
+
+        return RespGenerstor.success(result);
+    }
+
+    @ResponseBody
+    @PostMapping("/saveEsIndex")
+    public BaseResponse saveEsIndex(@RequestBody JSONObject reqMap) {
+        int count = 0;
+        try {
+            EsIndexVo dataModel = reqMap.getObject("dataModel", EsIndexVo.class);
+            List<EsIndexfieldVo> fieldList = reqMap.getJSONArray("fieldList").toJavaList(EsIndexfieldVo.class);
+            UserInfoModel user = userService.getUserInfo(accountService.getLoginUserID());
+            count = esIndexService.saveEsIndex(dataModel, fieldList, user.userId,user.name);
+        } catch (Exception e) {
+            return RespGenerstor.fail("-1", "程序异常:" + e.getMessage());
+        }
+        return RespGenerstor.success(count);
+    }
+
+    @ResponseBody
+    @GetMapping("/getEsIndex")
+    public BaseResponse<EsIndexVo> getEsIndex(String indexId) {
+        EsIndexVo model = esIndexService.getEsIndex(indexId);
+
+        return RespGenerstor.success(model);
+    }
+
+    @ResponseBody
+    @GetMapping("/getFieldList")
+    public BaseResponse<List<EsIndexfieldVo>> getFieldList(String indexId) throws Exception {
+
+        List<EsIndexfieldVo> result = esIndexService.getFieldList(indexId);
+
+        return RespGenerstor.success(result);
+    }
+
+    @ResponseBody
+    @PostMapping("/delete")
+    public BaseResponse delete(@RequestBody List<String> idList) {
+        Integer result = esIndexService.delete(idList);
+        if (result <= 0) {
+            return RespGenerstor.fail("1003", "数据已经被使用");
+        }
+        return RespGenerstor.success(1);
+    }
+
+    @ResponseBody
+    @GetMapping("/exportEsIndex")
+    public void exportEsIndex(HttpServletResponse response,
+                              @RequestParam(required = false) List<String> idList,
+                              String indexName, String indexCode) throws Exception {
+        List<EsIndexVo> dataList = esIndexService.getList(1, 9999, indexName, indexCode, idList).getList();
+
+        ExcelHelper excelHelper = new ExcelHelper();
+        ExcelHelper.ExcelData data = excelHelper.new ExcelData();
+        data.setTitles(Arrays.asList(new String[]{"索引名称", "索引编码", "描述", "显示类型", "创建时间", "创建人"}));
+
+        List<List<Object>> rowData = new ArrayList();
+        for (EsIndexVo item : dataList) {
+            List<Object> row = new ArrayList();
+            row.add(item.getIndexName());
+            row.add(item.getIndexCode());
+            row.add(item.getIndexDesc());
+            row.add(item.getDisplayTypeName());
+            row.add(dateUtils.dateToStr(item.getCreateTime()));
+            row.add(item.getCreatedName());
+            rowData.add(row);
+        }
+        data.setRows(rowData);
+        excelHelper.exportExcel(response, data);
+    }
+
+    @PostMapping("importData")
+    public BaseResponse<Object> importData(@RequestBody List<EsIndexfieldVo> dataList) {
+
+        List<EsIndexfieldVo> result = esIndexService.importData(dataList);
+
+        if (result.stream().filter(it -> !stringUtils.IsNullOrEmpty(it.getErrorMessage())).collect(Collectors.toList()).size() > 0) {
+            return RespGenerstor.fail(BaseErrorEnum.IMPORT_DATA_ERROR, result);
+        } else {
+            return RespGenerstor.success(result);
+        }
+    }
+}

+ 30 - 0
src/main/java/com/bowintek/practice/mapper/EsIndexMapper.java

@@ -0,0 +1,30 @@
+package com.bowintek.practice.mapper;
+
+import com.bowintek.practice.model.EsIndex;
+import com.bowintek.practice.model.EsIndexExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface EsIndexMapper {
+    long countByExample(EsIndexExample example);
+
+    int deleteByExample(EsIndexExample example);
+
+    int deleteByPrimaryKey(String indexId);
+
+    int insert(EsIndex row);
+
+    int insertSelective(EsIndex row);
+
+    List<EsIndex> selectByExample(EsIndexExample example);
+
+    EsIndex selectByPrimaryKey(String indexId);
+
+    int updateByExampleSelective(@Param("row") EsIndex row, @Param("example") EsIndexExample example);
+
+    int updateByExample(@Param("row") EsIndex row, @Param("example") EsIndexExample example);
+
+    int updateByPrimaryKeySelective(EsIndex row);
+
+    int updateByPrimaryKey(EsIndex row);
+}

+ 30 - 0
src/main/java/com/bowintek/practice/mapper/EsIndexfieldMapper.java

@@ -0,0 +1,30 @@
+package com.bowintek.practice.mapper;
+
+import com.bowintek.practice.model.EsIndexfield;
+import com.bowintek.practice.model.EsIndexfieldExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface EsIndexfieldMapper {
+    long countByExample(EsIndexfieldExample example);
+
+    int deleteByExample(EsIndexfieldExample example);
+
+    int deleteByPrimaryKey(String fieldId);
+
+    int insert(EsIndexfield row);
+
+    int insertSelective(EsIndexfield row);
+
+    List<EsIndexfield> selectByExample(EsIndexfieldExample example);
+
+    EsIndexfield selectByPrimaryKey(String fieldId);
+
+    int updateByExampleSelective(@Param("row") EsIndexfield row, @Param("example") EsIndexfieldExample example);
+
+    int updateByExample(@Param("row") EsIndexfield row, @Param("example") EsIndexfieldExample example);
+
+    int updateByPrimaryKeySelective(EsIndexfield row);
+
+    int updateByPrimaryKey(EsIndexfield row);
+}

+ 12 - 0
src/main/java/com/bowintek/practice/mapper/cquery/EsIndexCquery.java

@@ -0,0 +1,12 @@
+package com.bowintek.practice.mapper.cquery;
+
+import com.bowintek.practice.vo.EsIndexVo;
+import com.bowintek.practice.vo.EsIndexfieldVo;
+import java.util.HashMap;
+import java.util.List;
+
+public interface EsIndexCquery {
+
+    List<EsIndexVo> getList(String indexName, String indexCode, String indexIdsString);
+    List<EsIndexfieldVo> getFieldList(String indexId);
+}

+ 105 - 0
src/main/java/com/bowintek/practice/model/EsIndex.java

@@ -0,0 +1,105 @@
+package com.bowintek.practice.model;
+
+import java.util.Date;
+
+public class EsIndex {
+    private String indexId;
+
+    private String indexName;
+
+    private String indexCode;
+
+    private String indexDesc;
+
+    private Integer displayType;
+
+    private String createdName;
+
+    private Date createTime;
+
+    private Date modiTime;
+
+    private String createdBy;
+
+    private Integer status;
+
+    public String getIndexId() {
+        return indexId;
+    }
+
+    public void setIndexId(String indexId) {
+        this.indexId = indexId == null ? null : indexId.trim();
+    }
+
+    public String getIndexName() {
+        return indexName;
+    }
+
+    public void setIndexName(String indexName) {
+        this.indexName = indexName == null ? null : indexName.trim();
+    }
+
+    public String getIndexCode() {
+        return indexCode;
+    }
+
+    public void setIndexCode(String indexCode) {
+        this.indexCode = indexCode == null ? null : indexCode.trim();
+    }
+
+    public String getIndexDesc() {
+        return indexDesc;
+    }
+
+    public void setIndexDesc(String indexDesc) {
+        this.indexDesc = indexDesc == null ? null : indexDesc.trim();
+    }
+
+    public Integer getDisplayType() {
+        return displayType;
+    }
+
+    public void setDisplayType(Integer displayType) {
+        this.displayType = displayType;
+    }
+
+    public String getCreatedName() {
+        return createdName;
+    }
+
+    public void setCreatedName(String createdName) {
+        this.createdName = createdName == null ? null : createdName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getModiTime() {
+        return modiTime;
+    }
+
+    public void setModiTime(Date modiTime) {
+        this.modiTime = modiTime;
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy == null ? null : createdBy.trim();
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+}

+ 860 - 0
src/main/java/com/bowintek/practice/model/EsIndexExample.java

@@ -0,0 +1,860 @@
+package com.bowintek.practice.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class EsIndexExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public EsIndexExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIndexIdIsNull() {
+            addCriterion("indexId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdIsNotNull() {
+            addCriterion("indexId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdEqualTo(String value) {
+            addCriterion("indexId =", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotEqualTo(String value) {
+            addCriterion("indexId <>", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdGreaterThan(String value) {
+            addCriterion("indexId >", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdGreaterThanOrEqualTo(String value) {
+            addCriterion("indexId >=", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdLessThan(String value) {
+            addCriterion("indexId <", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdLessThanOrEqualTo(String value) {
+            addCriterion("indexId <=", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdLike(String value) {
+            addCriterion("indexId like", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotLike(String value) {
+            addCriterion("indexId not like", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdIn(List<String> values) {
+            addCriterion("indexId in", values, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotIn(List<String> values) {
+            addCriterion("indexId not in", values, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdBetween(String value1, String value2) {
+            addCriterion("indexId between", value1, value2, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotBetween(String value1, String value2) {
+            addCriterion("indexId not between", value1, value2, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameIsNull() {
+            addCriterion("indexName is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameIsNotNull() {
+            addCriterion("indexName is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameEqualTo(String value) {
+            addCriterion("indexName =", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameNotEqualTo(String value) {
+            addCriterion("indexName <>", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameGreaterThan(String value) {
+            addCriterion("indexName >", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameGreaterThanOrEqualTo(String value) {
+            addCriterion("indexName >=", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameLessThan(String value) {
+            addCriterion("indexName <", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameLessThanOrEqualTo(String value) {
+            addCriterion("indexName <=", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameLike(String value) {
+            addCriterion("indexName like", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameNotLike(String value) {
+            addCriterion("indexName not like", value, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameIn(List<String> values) {
+            addCriterion("indexName in", values, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameNotIn(List<String> values) {
+            addCriterion("indexName not in", values, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameBetween(String value1, String value2) {
+            addCriterion("indexName between", value1, value2, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexNameNotBetween(String value1, String value2) {
+            addCriterion("indexName not between", value1, value2, "indexName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeIsNull() {
+            addCriterion("indexCode is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeIsNotNull() {
+            addCriterion("indexCode is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeEqualTo(String value) {
+            addCriterion("indexCode =", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeNotEqualTo(String value) {
+            addCriterion("indexCode <>", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeGreaterThan(String value) {
+            addCriterion("indexCode >", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("indexCode >=", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeLessThan(String value) {
+            addCriterion("indexCode <", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeLessThanOrEqualTo(String value) {
+            addCriterion("indexCode <=", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeLike(String value) {
+            addCriterion("indexCode like", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeNotLike(String value) {
+            addCriterion("indexCode not like", value, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeIn(List<String> values) {
+            addCriterion("indexCode in", values, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeNotIn(List<String> values) {
+            addCriterion("indexCode not in", values, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeBetween(String value1, String value2) {
+            addCriterion("indexCode between", value1, value2, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexCodeNotBetween(String value1, String value2) {
+            addCriterion("indexCode not between", value1, value2, "indexCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescIsNull() {
+            addCriterion("indexDesc is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescIsNotNull() {
+            addCriterion("indexDesc is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescEqualTo(String value) {
+            addCriterion("indexDesc =", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescNotEqualTo(String value) {
+            addCriterion("indexDesc <>", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescGreaterThan(String value) {
+            addCriterion("indexDesc >", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescGreaterThanOrEqualTo(String value) {
+            addCriterion("indexDesc >=", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescLessThan(String value) {
+            addCriterion("indexDesc <", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescLessThanOrEqualTo(String value) {
+            addCriterion("indexDesc <=", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescLike(String value) {
+            addCriterion("indexDesc like", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescNotLike(String value) {
+            addCriterion("indexDesc not like", value, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescIn(List<String> values) {
+            addCriterion("indexDesc in", values, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescNotIn(List<String> values) {
+            addCriterion("indexDesc not in", values, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescBetween(String value1, String value2) {
+            addCriterion("indexDesc between", value1, value2, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexDescNotBetween(String value1, String value2) {
+            addCriterion("indexDesc not between", value1, value2, "indexDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeIsNull() {
+            addCriterion("displayType is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeIsNotNull() {
+            addCriterion("displayType is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeEqualTo(Integer value) {
+            addCriterion("displayType =", value, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeNotEqualTo(Integer value) {
+            addCriterion("displayType <>", value, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeGreaterThan(Integer value) {
+            addCriterion("displayType >", value, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("displayType >=", value, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeLessThan(Integer value) {
+            addCriterion("displayType <", value, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("displayType <=", value, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeIn(List<Integer> values) {
+            addCriterion("displayType in", values, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeNotIn(List<Integer> values) {
+            addCriterion("displayType not in", values, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeBetween(Integer value1, Integer value2) {
+            addCriterion("displayType between", value1, value2, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisplayTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("displayType not between", value1, value2, "displayType");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameIsNull() {
+            addCriterion("createdName is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameIsNotNull() {
+            addCriterion("createdName is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameEqualTo(String value) {
+            addCriterion("createdName =", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameNotEqualTo(String value) {
+            addCriterion("createdName <>", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameGreaterThan(String value) {
+            addCriterion("createdName >", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameGreaterThanOrEqualTo(String value) {
+            addCriterion("createdName >=", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameLessThan(String value) {
+            addCriterion("createdName <", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameLessThanOrEqualTo(String value) {
+            addCriterion("createdName <=", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameLike(String value) {
+            addCriterion("createdName like", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameNotLike(String value) {
+            addCriterion("createdName not like", value, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameIn(List<String> values) {
+            addCriterion("createdName in", values, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameNotIn(List<String> values) {
+            addCriterion("createdName not in", values, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameBetween(String value1, String value2) {
+            addCriterion("createdName between", value1, value2, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedNameNotBetween(String value1, String value2) {
+            addCriterion("createdName not between", value1, value2, "createdName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("createTime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("createTime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("createTime =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("createTime <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("createTime >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("createTime >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("createTime <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("createTime <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("createTime in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("createTime not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("createTime between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("createTime not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeIsNull() {
+            addCriterion("modiTime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeIsNotNull() {
+            addCriterion("modiTime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeEqualTo(Date value) {
+            addCriterion("modiTime =", value, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeNotEqualTo(Date value) {
+            addCriterion("modiTime <>", value, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeGreaterThan(Date value) {
+            addCriterion("modiTime >", value, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("modiTime >=", value, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeLessThan(Date value) {
+            addCriterion("modiTime <", value, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeLessThanOrEqualTo(Date value) {
+            addCriterion("modiTime <=", value, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeIn(List<Date> values) {
+            addCriterion("modiTime in", values, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeNotIn(List<Date> values) {
+            addCriterion("modiTime not in", values, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeBetween(Date value1, Date value2) {
+            addCriterion("modiTime between", value1, value2, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andModiTimeNotBetween(Date value1, Date value2) {
+            addCriterion("modiTime not between", value1, value2, "modiTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIsNull() {
+            addCriterion("createdBy is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIsNotNull() {
+            addCriterion("createdBy is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByEqualTo(String value) {
+            addCriterion("createdBy =", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotEqualTo(String value) {
+            addCriterion("createdBy <>", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByGreaterThan(String value) {
+            addCriterion("createdBy >", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByGreaterThanOrEqualTo(String value) {
+            addCriterion("createdBy >=", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLessThan(String value) {
+            addCriterion("createdBy <", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLessThanOrEqualTo(String value) {
+            addCriterion("createdBy <=", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByLike(String value) {
+            addCriterion("createdBy like", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotLike(String value) {
+            addCriterion("createdBy not like", value, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByIn(List<String> values) {
+            addCriterion("createdBy in", values, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotIn(List<String> values) {
+            addCriterion("createdBy not in", values, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByBetween(String value1, String value2) {
+            addCriterion("createdBy between", value1, value2, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedByNotBetween(String value1, String value2) {
+            addCriterion("createdBy not between", value1, value2, "createdBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 103 - 0
src/main/java/com/bowintek/practice/model/EsIndexfield.java

@@ -0,0 +1,103 @@
+package com.bowintek.practice.model;
+
+public class EsIndexfield {
+    private String fieldId;
+
+    private String indexId;
+
+    private String fieldCode;
+
+    private String fieldName;
+
+    private String fieldDesc;
+
+    private String dataType;
+
+    private Integer queryTypeId;
+
+    private Integer disOrder;
+
+    private Integer isSearchField;
+
+    private Integer isDisplay;
+
+    public String getFieldId() {
+        return fieldId;
+    }
+
+    public void setFieldId(String fieldId) {
+        this.fieldId = fieldId == null ? null : fieldId.trim();
+    }
+
+    public String getIndexId() {
+        return indexId;
+    }
+
+    public void setIndexId(String indexId) {
+        this.indexId = indexId == null ? null : indexId.trim();
+    }
+
+    public String getFieldCode() {
+        return fieldCode;
+    }
+
+    public void setFieldCode(String fieldCode) {
+        this.fieldCode = fieldCode == null ? null : fieldCode.trim();
+    }
+
+    public String getFieldName() {
+        return fieldName;
+    }
+
+    public void setFieldName(String fieldName) {
+        this.fieldName = fieldName == null ? null : fieldName.trim();
+    }
+
+    public String getFieldDesc() {
+        return fieldDesc;
+    }
+
+    public void setFieldDesc(String fieldDesc) {
+        this.fieldDesc = fieldDesc == null ? null : fieldDesc.trim();
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType == null ? null : dataType.trim();
+    }
+
+    public Integer getQueryTypeId() {
+        return queryTypeId;
+    }
+
+    public void setQueryTypeId(Integer queryTypeId) {
+        this.queryTypeId = queryTypeId;
+    }
+
+    public Integer getDisOrder() {
+        return disOrder;
+    }
+
+    public void setDisOrder(Integer disOrder) {
+        this.disOrder = disOrder;
+    }
+
+    public Integer getIsSearchField() {
+        return isSearchField;
+    }
+
+    public void setIsSearchField(Integer isSearchField) {
+        this.isSearchField = isSearchField;
+    }
+
+    public Integer getIsDisplay() {
+        return isDisplay;
+    }
+
+    public void setIsDisplay(Integer isDisplay) {
+        this.isDisplay = isDisplay;
+    }
+}

+ 859 - 0
src/main/java/com/bowintek/practice/model/EsIndexfieldExample.java

@@ -0,0 +1,859 @@
+package com.bowintek.practice.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class EsIndexfieldExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public EsIndexfieldExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andFieldIdIsNull() {
+            addCriterion("fieldId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdIsNotNull() {
+            addCriterion("fieldId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdEqualTo(String value) {
+            addCriterion("fieldId =", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdNotEqualTo(String value) {
+            addCriterion("fieldId <>", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdGreaterThan(String value) {
+            addCriterion("fieldId >", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdGreaterThanOrEqualTo(String value) {
+            addCriterion("fieldId >=", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdLessThan(String value) {
+            addCriterion("fieldId <", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdLessThanOrEqualTo(String value) {
+            addCriterion("fieldId <=", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdLike(String value) {
+            addCriterion("fieldId like", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdNotLike(String value) {
+            addCriterion("fieldId not like", value, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdIn(List<String> values) {
+            addCriterion("fieldId in", values, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdNotIn(List<String> values) {
+            addCriterion("fieldId not in", values, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdBetween(String value1, String value2) {
+            addCriterion("fieldId between", value1, value2, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldIdNotBetween(String value1, String value2) {
+            addCriterion("fieldId not between", value1, value2, "fieldId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdIsNull() {
+            addCriterion("indexId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdIsNotNull() {
+            addCriterion("indexId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdEqualTo(String value) {
+            addCriterion("indexId =", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotEqualTo(String value) {
+            addCriterion("indexId <>", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdGreaterThan(String value) {
+            addCriterion("indexId >", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdGreaterThanOrEqualTo(String value) {
+            addCriterion("indexId >=", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdLessThan(String value) {
+            addCriterion("indexId <", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdLessThanOrEqualTo(String value) {
+            addCriterion("indexId <=", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdLike(String value) {
+            addCriterion("indexId like", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotLike(String value) {
+            addCriterion("indexId not like", value, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdIn(List<String> values) {
+            addCriterion("indexId in", values, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotIn(List<String> values) {
+            addCriterion("indexId not in", values, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdBetween(String value1, String value2) {
+            addCriterion("indexId between", value1, value2, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndexIdNotBetween(String value1, String value2) {
+            addCriterion("indexId not between", value1, value2, "indexId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeIsNull() {
+            addCriterion("fieldCode is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeIsNotNull() {
+            addCriterion("fieldCode is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeEqualTo(String value) {
+            addCriterion("fieldCode =", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeNotEqualTo(String value) {
+            addCriterion("fieldCode <>", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeGreaterThan(String value) {
+            addCriterion("fieldCode >", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("fieldCode >=", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeLessThan(String value) {
+            addCriterion("fieldCode <", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeLessThanOrEqualTo(String value) {
+            addCriterion("fieldCode <=", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeLike(String value) {
+            addCriterion("fieldCode like", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeNotLike(String value) {
+            addCriterion("fieldCode not like", value, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeIn(List<String> values) {
+            addCriterion("fieldCode in", values, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeNotIn(List<String> values) {
+            addCriterion("fieldCode not in", values, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeBetween(String value1, String value2) {
+            addCriterion("fieldCode between", value1, value2, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldCodeNotBetween(String value1, String value2) {
+            addCriterion("fieldCode not between", value1, value2, "fieldCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameIsNull() {
+            addCriterion("fieldName is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameIsNotNull() {
+            addCriterion("fieldName is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameEqualTo(String value) {
+            addCriterion("fieldName =", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameNotEqualTo(String value) {
+            addCriterion("fieldName <>", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameGreaterThan(String value) {
+            addCriterion("fieldName >", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameGreaterThanOrEqualTo(String value) {
+            addCriterion("fieldName >=", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameLessThan(String value) {
+            addCriterion("fieldName <", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameLessThanOrEqualTo(String value) {
+            addCriterion("fieldName <=", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameLike(String value) {
+            addCriterion("fieldName like", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameNotLike(String value) {
+            addCriterion("fieldName not like", value, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameIn(List<String> values) {
+            addCriterion("fieldName in", values, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameNotIn(List<String> values) {
+            addCriterion("fieldName not in", values, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameBetween(String value1, String value2) {
+            addCriterion("fieldName between", value1, value2, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldNameNotBetween(String value1, String value2) {
+            addCriterion("fieldName not between", value1, value2, "fieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescIsNull() {
+            addCriterion("fieldDesc is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescIsNotNull() {
+            addCriterion("fieldDesc is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescEqualTo(String value) {
+            addCriterion("fieldDesc =", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescNotEqualTo(String value) {
+            addCriterion("fieldDesc <>", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescGreaterThan(String value) {
+            addCriterion("fieldDesc >", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescGreaterThanOrEqualTo(String value) {
+            addCriterion("fieldDesc >=", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescLessThan(String value) {
+            addCriterion("fieldDesc <", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescLessThanOrEqualTo(String value) {
+            addCriterion("fieldDesc <=", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescLike(String value) {
+            addCriterion("fieldDesc like", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescNotLike(String value) {
+            addCriterion("fieldDesc not like", value, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescIn(List<String> values) {
+            addCriterion("fieldDesc in", values, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescNotIn(List<String> values) {
+            addCriterion("fieldDesc not in", values, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescBetween(String value1, String value2) {
+            addCriterion("fieldDesc between", value1, value2, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andFieldDescNotBetween(String value1, String value2) {
+            addCriterion("fieldDesc not between", value1, value2, "fieldDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeIsNull() {
+            addCriterion("dataType is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeIsNotNull() {
+            addCriterion("dataType is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeEqualTo(String value) {
+            addCriterion("dataType =", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeNotEqualTo(String value) {
+            addCriterion("dataType <>", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeGreaterThan(String value) {
+            addCriterion("dataType >", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("dataType >=", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeLessThan(String value) {
+            addCriterion("dataType <", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeLessThanOrEqualTo(String value) {
+            addCriterion("dataType <=", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeLike(String value) {
+            addCriterion("dataType like", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeNotLike(String value) {
+            addCriterion("dataType not like", value, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeIn(List<String> values) {
+            addCriterion("dataType in", values, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeNotIn(List<String> values) {
+            addCriterion("dataType not in", values, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeBetween(String value1, String value2) {
+            addCriterion("dataType between", value1, value2, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTypeNotBetween(String value1, String value2) {
+            addCriterion("dataType not between", value1, value2, "dataType");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdIsNull() {
+            addCriterion("queryTypeId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdIsNotNull() {
+            addCriterion("queryTypeId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdEqualTo(Integer value) {
+            addCriterion("queryTypeId =", value, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdNotEqualTo(Integer value) {
+            addCriterion("queryTypeId <>", value, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdGreaterThan(Integer value) {
+            addCriterion("queryTypeId >", value, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("queryTypeId >=", value, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdLessThan(Integer value) {
+            addCriterion("queryTypeId <", value, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdLessThanOrEqualTo(Integer value) {
+            addCriterion("queryTypeId <=", value, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdIn(List<Integer> values) {
+            addCriterion("queryTypeId in", values, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdNotIn(List<Integer> values) {
+            addCriterion("queryTypeId not in", values, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdBetween(Integer value1, Integer value2) {
+            addCriterion("queryTypeId between", value1, value2, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andQueryTypeIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("queryTypeId not between", value1, value2, "queryTypeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderIsNull() {
+            addCriterion("disOrder is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderIsNotNull() {
+            addCriterion("disOrder is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderEqualTo(Integer value) {
+            addCriterion("disOrder =", value, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderNotEqualTo(Integer value) {
+            addCriterion("disOrder <>", value, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderGreaterThan(Integer value) {
+            addCriterion("disOrder >", value, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderGreaterThanOrEqualTo(Integer value) {
+            addCriterion("disOrder >=", value, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderLessThan(Integer value) {
+            addCriterion("disOrder <", value, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderLessThanOrEqualTo(Integer value) {
+            addCriterion("disOrder <=", value, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderIn(List<Integer> values) {
+            addCriterion("disOrder in", values, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderNotIn(List<Integer> values) {
+            addCriterion("disOrder not in", values, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderBetween(Integer value1, Integer value2) {
+            addCriterion("disOrder between", value1, value2, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andDisOrderNotBetween(Integer value1, Integer value2) {
+            addCriterion("disOrder not between", value1, value2, "disOrder");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldIsNull() {
+            addCriterion("isSearchField is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldIsNotNull() {
+            addCriterion("isSearchField is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldEqualTo(Integer value) {
+            addCriterion("isSearchField =", value, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldNotEqualTo(Integer value) {
+            addCriterion("isSearchField <>", value, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldGreaterThan(Integer value) {
+            addCriterion("isSearchField >", value, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldGreaterThanOrEqualTo(Integer value) {
+            addCriterion("isSearchField >=", value, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldLessThan(Integer value) {
+            addCriterion("isSearchField <", value, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldLessThanOrEqualTo(Integer value) {
+            addCriterion("isSearchField <=", value, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldIn(List<Integer> values) {
+            addCriterion("isSearchField in", values, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldNotIn(List<Integer> values) {
+            addCriterion("isSearchField not in", values, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldBetween(Integer value1, Integer value2) {
+            addCriterion("isSearchField between", value1, value2, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsSearchFieldNotBetween(Integer value1, Integer value2) {
+            addCriterion("isSearchField not between", value1, value2, "isSearchField");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayIsNull() {
+            addCriterion("isDisplay is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayIsNotNull() {
+            addCriterion("isDisplay is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayEqualTo(Integer value) {
+            addCriterion("isDisplay =", value, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayNotEqualTo(Integer value) {
+            addCriterion("isDisplay <>", value, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayGreaterThan(Integer value) {
+            addCriterion("isDisplay >", value, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayGreaterThanOrEqualTo(Integer value) {
+            addCriterion("isDisplay >=", value, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayLessThan(Integer value) {
+            addCriterion("isDisplay <", value, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayLessThanOrEqualTo(Integer value) {
+            addCriterion("isDisplay <=", value, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayIn(List<Integer> values) {
+            addCriterion("isDisplay in", values, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayNotIn(List<Integer> values) {
+            addCriterion("isDisplay not in", values, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayBetween(Integer value1, Integer value2) {
+            addCriterion("isDisplay between", value1, value2, "isDisplay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDisplayNotBetween(Integer value1, Integer value2) {
+            addCriterion("isDisplay not between", value1, value2, "isDisplay");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 155 - 0
src/main/java/com/bowintek/practice/services/impl/EsIndexServiceImpl.java

@@ -0,0 +1,155 @@
+package com.bowintek.practice.services.impl;
+
+import com.bowintek.practice.filter.exception.BaseException;
+import com.bowintek.practice.mapper.EsIndexMapper;
+import com.bowintek.practice.mapper.EsIndexfieldMapper;
+import com.bowintek.practice.mapper.cquery.EsIndexCquery;
+import com.bowintek.practice.model.*;
+import com.bowintek.practice.services.service.EsIndexService;
+import com.bowintek.practice.services.service.system.DictionaryService;
+import com.bowintek.practice.util.Constant;
+import com.bowintek.practice.util.StringUtils;
+import com.bowintek.practice.vo.EsIndexVo;
+import com.bowintek.practice.vo.EsIndexfieldVo;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+@Service("EsIndexService")
+public class EsIndexServiceImpl implements EsIndexService {
+
+    @Autowired
+    private EsIndexCquery esIndexCquery;
+    @Autowired
+    private StringUtils stringUtils;
+    @Autowired
+    private DictionaryService dictionaryService;
+    @Autowired
+    private EsIndexMapper esIndexMapper;
+    @Autowired
+    private EsIndexfieldMapper esIndexfieldMapper;
+
+    @Override
+    public PageInfo<EsIndexVo> getList(Integer page, Integer rows,
+                                       String indexName, String indexCode,List<String> idList) {
+        PageHelper.startPage(page, rows);
+
+        List<EsIndexVo> dataList = esIndexCquery.getList(indexName, indexCode, stringUtils.ListToInSql(idList));
+
+        PageInfo<EsIndexVo> result = new PageInfo(dataList);
+        return result;
+    }
+
+    @Override
+    public EsIndexVo getEsIndex(String indexId) {
+        EsIndexVo esIndex = esIndexCquery.getList(null, null, indexId).get(0);
+        return esIndex;
+    }
+
+    @Override
+    public int saveEsIndex(EsIndexVo model, List<EsIndexfieldVo> fieldList, String userId, String userName) {
+
+        EsIndex dbData = esIndexMapper.selectByPrimaryKey(model.getIndexId());
+        int result = 0;
+        if (dbData == null) {
+            model.setIndexId(UUID.randomUUID().toString());
+            model.setStatus(1);
+            model.setCreatedBy(userId);
+            model.setCreateTime(new Date());
+            model.setModiTime(new Date());
+            model.setCreatedName(userName);
+            result = esIndexMapper.insert(model);
+        } else {
+            model.setModiTime(new Date());
+            result = esIndexMapper.updateByPrimaryKey(model);
+        }
+
+        if (fieldList != null && fieldList.size() > 0) {
+            EsIndexfieldExample example = new EsIndexfieldExample();
+            EsIndexfieldExample.Criteria criteria = example.or();
+            criteria.andIndexIdEqualTo(model.getIndexId());
+            List<EsIndexfield> dbList = esIndexfieldMapper.selectByExample(example);
+
+            if (dbList.size() > 0) {
+                List<String> ids = fieldList.stream().map(x -> x.getFieldId()).collect(Collectors.toList());
+
+                criteria.andFieldIdNotIn(ids);
+                esIndexfieldMapper.deleteByExample(example);
+            }
+
+            fieldList.stream().forEach(x -> {
+                long count = dbList.stream().filter(f -> f.getFieldId().equals(x.getFieldId())).count();
+                if (count > 0) {
+                    esIndexfieldMapper.updateByPrimaryKeySelective(x);
+                } else {
+                    x.setIndexId(model.getIndexId());
+                    x.setFieldId(UUID.randomUUID().toString());
+                    esIndexfieldMapper.insertSelective(x);
+                }
+            });
+        }
+        return result;
+    }
+
+    @Override
+    public List<EsIndexfieldVo> getFieldList(String indexId) {
+        List<EsIndexfieldVo> dbList = esIndexCquery.getFieldList(indexId);
+        return dbList;
+    }
+
+    @Override
+    public int delete(List<String> idList) {
+        try {
+            EsIndexfieldExample example = new EsIndexfieldExample();
+            EsIndexfieldExample.Criteria criteria = example.or();
+            criteria.andIndexIdIn(idList);
+            esIndexfieldMapper.deleteByExample(example);
+
+            EsIndexExample subExp = new EsIndexExample();
+            subExp.or().andIndexIdIn(idList);
+            esIndexMapper.deleteByExample(subExp);
+        } catch (Exception e) {
+            return 0;
+        }
+        return 1;
+    }
+
+    @Override
+    public List<EsIndexfieldVo> importData(List<EsIndexfieldVo> dataList) {
+
+        if (dataList.size() <= 0)
+            throw new BaseException("", "请添加导入数据!");
+        List<SysDictionaryItem> dicQueryTypeList = dictionaryService.getDictionaryItemList("queryType");
+
+        dataList.forEach(item -> {
+            String errorInfo = "";
+            SysDictionaryItem dicQueryType = dicQueryTypeList.stream().filter(e -> e.getName().equals(item.getQueryTypeName())).findFirst().orElse(null);
+
+            if (stringUtils.IsNullOrEmpty(item.getFieldCode()))
+                errorInfo += "请填写字段编码!";
+
+            if (stringUtils.IsNullOrEmpty(item.getFieldName()))
+                errorInfo += "请填写字段名称!";
+
+            if (stringUtils.IsNullOrEmpty(item.getDataType()))
+                errorInfo += "请填写数据类型!";
+
+            if (dicQueryType == null)
+                errorInfo += "查询类型不在支持范围!";
+
+            if (stringUtils.IsNullOrEmpty(errorInfo)) {
+                item.setQueryTypeId(dicQueryType.getValue());
+                item.setIsSearchField(Constant.YES.equals(item.getIsSearchFieldText()) ? 1 : 0);
+                item.setIsDisplay(Constant.YES.equals(item.getIsDisplayText()) ? 1 : 0);
+            }
+            item.setErrorMessage(errorInfo);
+        });
+        return dataList;
+    }
+}

+ 17 - 0
src/main/java/com/bowintek/practice/services/service/EsIndexService.java

@@ -0,0 +1,17 @@
+package com.bowintek.practice.services.service;
+
+import com.bowintek.practice.vo.EsIndexVo;
+import com.bowintek.practice.vo.EsIndexfieldVo;
+import com.github.pagehelper.PageInfo;
+
+import java.util.List;
+
+public interface EsIndexService {
+    PageInfo<EsIndexVo> getList(Integer page, Integer rows,
+                                String indexName, String indexCode, List<String> idList);
+    EsIndexVo getEsIndex(String indexId);
+    int saveEsIndex(EsIndexVo model, List<EsIndexfieldVo> fieldList, String userId, String userName);
+    List<EsIndexfieldVo> getFieldList(String indexId);
+    int delete(List<String> idList);
+    List<EsIndexfieldVo> importData(List<EsIndexfieldVo> dataList);
+}

+ 9 - 0
src/main/java/com/bowintek/practice/vo/EsIndexVo.java

@@ -0,0 +1,9 @@
+package com.bowintek.practice.vo;
+
+import com.bowintek.practice.model.EsIndex;
+import lombok.Data;
+
+@Data
+public class EsIndexVo extends EsIndex {
+    private String displayTypeName;
+}

+ 12 - 0
src/main/java/com/bowintek/practice/vo/EsIndexfieldVo.java

@@ -0,0 +1,12 @@
+package com.bowintek.practice.vo;
+
+import com.bowintek.practice.model.EsIndexfield;
+import lombok.Data;
+
+@Data
+public class EsIndexfieldVo extends EsIndexfield {
+    private  String queryTypeName;
+    private String errorMessage;
+    private String isSearchFieldText;
+    private String isDisplayText;
+}

+ 2 - 1
src/main/resources/generatorConfig.xml

@@ -118,6 +118,7 @@
             <columnOverride column="StandardMajorID" javaType="java.lang.Integer" jdbcType="INTEGER" />
             <table schema="" tableName="Sys_Log"><property name="useActualColumnNames" value="true"/></table>
         </table>-->
-        <table schema="" tableName="wl_user_expend_setting"><property name="useActualColumnNames" value="true"/></table>
+        <table schema="" tableName="es_index"><property name="useActualColumnNames" value="true"/></table>
+        <table schema="" tableName="es_indexField"><property name="useActualColumnNames" value="true"/></table>
     </context>
 </generatorConfiguration>

+ 291 - 0
src/main/resources/mapping/EsIndexMapper.xml

@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bowintek.practice.mapper.EsIndexMapper">
+  <resultMap id="BaseResultMap" type="com.bowintek.practice.model.EsIndex">
+    <id column="indexId" jdbcType="VARCHAR" property="indexId" />
+    <result column="indexName" jdbcType="VARCHAR" property="indexName" />
+    <result column="indexCode" jdbcType="VARCHAR" property="indexCode" />
+    <result column="indexDesc" jdbcType="VARCHAR" property="indexDesc" />
+    <result column="displayType" jdbcType="INTEGER" property="displayType" />
+    <result column="createdName" jdbcType="VARCHAR" property="createdName" />
+    <result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="modiTime" jdbcType="TIMESTAMP" property="modiTime" />
+    <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    indexId, indexName, indexCode, indexDesc, displayType, createdName, createTime, modiTime, 
+    createdBy, status
+  </sql>
+  <select id="selectByExample" parameterType="com.bowintek.practice.model.EsIndexExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from es_index
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from es_index
+    where indexId = #{indexId,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from es_index
+    where indexId = #{indexId,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.bowintek.practice.model.EsIndexExample">
+    delete from es_index
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.bowintek.practice.model.EsIndex">
+    insert into es_index (indexId, indexName, indexCode, 
+      indexDesc, displayType, createdName, 
+      createTime, modiTime, createdBy, 
+      status)
+    values (#{indexId,jdbcType=VARCHAR}, #{indexName,jdbcType=VARCHAR}, #{indexCode,jdbcType=VARCHAR}, 
+      #{indexDesc,jdbcType=VARCHAR}, #{displayType,jdbcType=INTEGER}, #{createdName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{modiTime,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.bowintek.practice.model.EsIndex">
+    insert into es_index
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="indexId != null">
+        indexId,
+      </if>
+      <if test="indexName != null">
+        indexName,
+      </if>
+      <if test="indexCode != null">
+        indexCode,
+      </if>
+      <if test="indexDesc != null">
+        indexDesc,
+      </if>
+      <if test="displayType != null">
+        displayType,
+      </if>
+      <if test="createdName != null">
+        createdName,
+      </if>
+      <if test="createTime != null">
+        createTime,
+      </if>
+      <if test="modiTime != null">
+        modiTime,
+      </if>
+      <if test="createdBy != null">
+        createdBy,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="indexId != null">
+        #{indexId,jdbcType=VARCHAR},
+      </if>
+      <if test="indexName != null">
+        #{indexName,jdbcType=VARCHAR},
+      </if>
+      <if test="indexCode != null">
+        #{indexCode,jdbcType=VARCHAR},
+      </if>
+      <if test="indexDesc != null">
+        #{indexDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="displayType != null">
+        #{displayType,jdbcType=INTEGER},
+      </if>
+      <if test="createdName != null">
+        #{createdName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="modiTime != null">
+        #{modiTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdBy != null">
+        #{createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.bowintek.practice.model.EsIndexExample" resultType="java.lang.Long">
+    select count(*) from es_index
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update es_index
+    <set>
+      <if test="row.indexId != null">
+        indexId = #{row.indexId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.indexName != null">
+        indexName = #{row.indexName,jdbcType=VARCHAR},
+      </if>
+      <if test="row.indexCode != null">
+        indexCode = #{row.indexCode,jdbcType=VARCHAR},
+      </if>
+      <if test="row.indexDesc != null">
+        indexDesc = #{row.indexDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="row.displayType != null">
+        displayType = #{row.displayType,jdbcType=INTEGER},
+      </if>
+      <if test="row.createdName != null">
+        createdName = #{row.createdName,jdbcType=VARCHAR},
+      </if>
+      <if test="row.createTime != null">
+        createTime = #{row.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.modiTime != null">
+        modiTime = #{row.modiTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.createdBy != null">
+        createdBy = #{row.createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="row.status != null">
+        status = #{row.status,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update es_index
+    set indexId = #{row.indexId,jdbcType=VARCHAR},
+      indexName = #{row.indexName,jdbcType=VARCHAR},
+      indexCode = #{row.indexCode,jdbcType=VARCHAR},
+      indexDesc = #{row.indexDesc,jdbcType=VARCHAR},
+      displayType = #{row.displayType,jdbcType=INTEGER},
+      createdName = #{row.createdName,jdbcType=VARCHAR},
+      createTime = #{row.createTime,jdbcType=TIMESTAMP},
+      modiTime = #{row.modiTime,jdbcType=TIMESTAMP},
+      createdBy = #{row.createdBy,jdbcType=VARCHAR},
+      status = #{row.status,jdbcType=INTEGER}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.bowintek.practice.model.EsIndex">
+    update es_index
+    <set>
+      <if test="indexName != null">
+        indexName = #{indexName,jdbcType=VARCHAR},
+      </if>
+      <if test="indexCode != null">
+        indexCode = #{indexCode,jdbcType=VARCHAR},
+      </if>
+      <if test="indexDesc != null">
+        indexDesc = #{indexDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="displayType != null">
+        displayType = #{displayType,jdbcType=INTEGER},
+      </if>
+      <if test="createdName != null">
+        createdName = #{createdName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        createTime = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="modiTime != null">
+        modiTime = #{modiTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdBy != null">
+        createdBy = #{createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+    </set>
+    where indexId = #{indexId,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.bowintek.practice.model.EsIndex">
+    update es_index
+    set indexName = #{indexName,jdbcType=VARCHAR},
+      indexCode = #{indexCode,jdbcType=VARCHAR},
+      indexDesc = #{indexDesc,jdbcType=VARCHAR},
+      displayType = #{displayType,jdbcType=INTEGER},
+      createdName = #{createdName,jdbcType=VARCHAR},
+      createTime = #{createTime,jdbcType=TIMESTAMP},
+      modiTime = #{modiTime,jdbcType=TIMESTAMP},
+      createdBy = #{createdBy,jdbcType=VARCHAR},
+      status = #{status,jdbcType=INTEGER}
+    where indexId = #{indexId,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 291 - 0
src/main/resources/mapping/EsIndexfieldMapper.xml

@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bowintek.practice.mapper.EsIndexfieldMapper">
+  <resultMap id="BaseResultMap" type="com.bowintek.practice.model.EsIndexfield">
+    <id column="fieldId" jdbcType="VARCHAR" property="fieldId" />
+    <result column="indexId" jdbcType="VARCHAR" property="indexId" />
+    <result column="fieldCode" jdbcType="VARCHAR" property="fieldCode" />
+    <result column="fieldName" jdbcType="VARCHAR" property="fieldName" />
+    <result column="fieldDesc" jdbcType="VARCHAR" property="fieldDesc" />
+    <result column="dataType" jdbcType="VARCHAR" property="dataType" />
+    <result column="queryTypeId" jdbcType="INTEGER" property="queryTypeId" />
+    <result column="disOrder" jdbcType="INTEGER" property="disOrder" />
+    <result column="isSearchField" jdbcType="INTEGER" property="isSearchField" />
+    <result column="isDisplay" jdbcType="INTEGER" property="isDisplay" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    fieldId, indexId, fieldCode, fieldName, fieldDesc, dataType, queryTypeId, disOrder, 
+    isSearchField, isDisplay
+  </sql>
+  <select id="selectByExample" parameterType="com.bowintek.practice.model.EsIndexfieldExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from es_indexfield
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from es_indexfield
+    where fieldId = #{fieldId,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from es_indexfield
+    where fieldId = #{fieldId,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.bowintek.practice.model.EsIndexfieldExample">
+    delete from es_indexfield
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.bowintek.practice.model.EsIndexfield">
+    insert into es_indexfield (fieldId, indexId, fieldCode, 
+      fieldName, fieldDesc, dataType, 
+      queryTypeId, disOrder, isSearchField, 
+      isDisplay)
+    values (#{fieldId,jdbcType=VARCHAR}, #{indexId,jdbcType=VARCHAR}, #{fieldCode,jdbcType=VARCHAR}, 
+      #{fieldName,jdbcType=VARCHAR}, #{fieldDesc,jdbcType=VARCHAR}, #{dataType,jdbcType=VARCHAR}, 
+      #{queryTypeId,jdbcType=INTEGER}, #{disOrder,jdbcType=INTEGER}, #{isSearchField,jdbcType=INTEGER}, 
+      #{isDisplay,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.bowintek.practice.model.EsIndexfield">
+    insert into es_indexfield
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="fieldId != null">
+        fieldId,
+      </if>
+      <if test="indexId != null">
+        indexId,
+      </if>
+      <if test="fieldCode != null">
+        fieldCode,
+      </if>
+      <if test="fieldName != null">
+        fieldName,
+      </if>
+      <if test="fieldDesc != null">
+        fieldDesc,
+      </if>
+      <if test="dataType != null">
+        dataType,
+      </if>
+      <if test="queryTypeId != null">
+        queryTypeId,
+      </if>
+      <if test="disOrder != null">
+        disOrder,
+      </if>
+      <if test="isSearchField != null">
+        isSearchField,
+      </if>
+      <if test="isDisplay != null">
+        isDisplay,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="fieldId != null">
+        #{fieldId,jdbcType=VARCHAR},
+      </if>
+      <if test="indexId != null">
+        #{indexId,jdbcType=VARCHAR},
+      </if>
+      <if test="fieldCode != null">
+        #{fieldCode,jdbcType=VARCHAR},
+      </if>
+      <if test="fieldName != null">
+        #{fieldName,jdbcType=VARCHAR},
+      </if>
+      <if test="fieldDesc != null">
+        #{fieldDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="dataType != null">
+        #{dataType,jdbcType=VARCHAR},
+      </if>
+      <if test="queryTypeId != null">
+        #{queryTypeId,jdbcType=INTEGER},
+      </if>
+      <if test="disOrder != null">
+        #{disOrder,jdbcType=INTEGER},
+      </if>
+      <if test="isSearchField != null">
+        #{isSearchField,jdbcType=INTEGER},
+      </if>
+      <if test="isDisplay != null">
+        #{isDisplay,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.bowintek.practice.model.EsIndexfieldExample" resultType="java.lang.Long">
+    select count(*) from es_indexfield
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update es_indexfield
+    <set>
+      <if test="row.fieldId != null">
+        fieldId = #{row.fieldId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.indexId != null">
+        indexId = #{row.indexId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.fieldCode != null">
+        fieldCode = #{row.fieldCode,jdbcType=VARCHAR},
+      </if>
+      <if test="row.fieldName != null">
+        fieldName = #{row.fieldName,jdbcType=VARCHAR},
+      </if>
+      <if test="row.fieldDesc != null">
+        fieldDesc = #{row.fieldDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="row.dataType != null">
+        dataType = #{row.dataType,jdbcType=VARCHAR},
+      </if>
+      <if test="row.queryTypeId != null">
+        queryTypeId = #{row.queryTypeId,jdbcType=INTEGER},
+      </if>
+      <if test="row.disOrder != null">
+        disOrder = #{row.disOrder,jdbcType=INTEGER},
+      </if>
+      <if test="row.isSearchField != null">
+        isSearchField = #{row.isSearchField,jdbcType=INTEGER},
+      </if>
+      <if test="row.isDisplay != null">
+        isDisplay = #{row.isDisplay,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update es_indexfield
+    set fieldId = #{row.fieldId,jdbcType=VARCHAR},
+      indexId = #{row.indexId,jdbcType=VARCHAR},
+      fieldCode = #{row.fieldCode,jdbcType=VARCHAR},
+      fieldName = #{row.fieldName,jdbcType=VARCHAR},
+      fieldDesc = #{row.fieldDesc,jdbcType=VARCHAR},
+      dataType = #{row.dataType,jdbcType=VARCHAR},
+      queryTypeId = #{row.queryTypeId,jdbcType=INTEGER},
+      disOrder = #{row.disOrder,jdbcType=INTEGER},
+      isSearchField = #{row.isSearchField,jdbcType=INTEGER},
+      isDisplay = #{row.isDisplay,jdbcType=INTEGER}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.bowintek.practice.model.EsIndexfield">
+    update es_indexfield
+    <set>
+      <if test="indexId != null">
+        indexId = #{indexId,jdbcType=VARCHAR},
+      </if>
+      <if test="fieldCode != null">
+        fieldCode = #{fieldCode,jdbcType=VARCHAR},
+      </if>
+      <if test="fieldName != null">
+        fieldName = #{fieldName,jdbcType=VARCHAR},
+      </if>
+      <if test="fieldDesc != null">
+        fieldDesc = #{fieldDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="dataType != null">
+        dataType = #{dataType,jdbcType=VARCHAR},
+      </if>
+      <if test="queryTypeId != null">
+        queryTypeId = #{queryTypeId,jdbcType=INTEGER},
+      </if>
+      <if test="disOrder != null">
+        disOrder = #{disOrder,jdbcType=INTEGER},
+      </if>
+      <if test="isSearchField != null">
+        isSearchField = #{isSearchField,jdbcType=INTEGER},
+      </if>
+      <if test="isDisplay != null">
+        isDisplay = #{isDisplay,jdbcType=INTEGER},
+      </if>
+    </set>
+    where fieldId = #{fieldId,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.bowintek.practice.model.EsIndexfield">
+    update es_indexfield
+    set indexId = #{indexId,jdbcType=VARCHAR},
+      fieldCode = #{fieldCode,jdbcType=VARCHAR},
+      fieldName = #{fieldName,jdbcType=VARCHAR},
+      fieldDesc = #{fieldDesc,jdbcType=VARCHAR},
+      dataType = #{dataType,jdbcType=VARCHAR},
+      queryTypeId = #{queryTypeId,jdbcType=INTEGER},
+      disOrder = #{disOrder,jdbcType=INTEGER},
+      isSearchField = #{isSearchField,jdbcType=INTEGER},
+      isDisplay = #{isDisplay,jdbcType=INTEGER}
+    where fieldId = #{fieldId,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 27 - 0
src/main/resources/mapping/cquery/EsIndexCQuery.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.bowintek.practice.mapper.cquery.EsIndexCquery">
+
+    <select id="getList" resultType="com.bowintek.practice.vo.EsIndexVo">
+        select ix.*,dicdis.Name as displayTypeName
+        from es_index ix
+        left join sys_dictionary_item dicdis on ix.displayType = dicdis.Value and dicdis.DictionaryCode='displayType'
+        where 1=1
+        <if test="indexName!='' and indexName!=null">
+            and ix.indexName like Concat('%',#{indexName},'%')
+        </if>
+        <if test="indexCode!='' and indexCode!=null">
+            and ix.indexCode like Concat('%',#{indexCode},'%')
+        </if>
+        <if test="indexIdsString!='' and indexIdsString!=null">
+            and ix.indexId in (#{indexIdsString})
+        </if>
+        order by ix.indexName
+    </select>
+    <select id="getFieldList" resultType="com.bowintek.practice.vo.EsIndexfieldVo">
+        select *
+        from es_indexField field
+
+        where field.indexId = #{indexId}
+    </select>
+</mapper>

BIN
src/main/resources/static/doc/template/主题字段导入模板.xlsx


BIN
src/main/resources/static/doc/template/索引字段导入模板.xlsx


+ 2 - 1
target/classes/generatorConfig.xml

@@ -118,6 +118,7 @@
             <columnOverride column="StandardMajorID" javaType="java.lang.Integer" jdbcType="INTEGER" />
             <table schema="" tableName="Sys_Log"><property name="useActualColumnNames" value="true"/></table>
         </table>-->
-        <table schema="" tableName="wl_user_expend_setting"><property name="useActualColumnNames" value="true"/></table>
+        <table schema="" tableName="es_index"><property name="useActualColumnNames" value="true"/></table>
+        <table schema="" tableName="es_indexField"><property name="useActualColumnNames" value="true"/></table>
     </context>
 </generatorConfiguration>

+ 3 - 0
vue/src/router/asyncModules/sale.ts

@@ -11,4 +11,7 @@ export default {
   'views/wellinfoDetail': () => import( '@/views/wellinfo/detail.vue'),
   'views/domain': () => import( '@/views/domainES/index.vue'),
   'views/domainResult': () => import( '@/views/domainES/result.vue'),
+  'views/esindexlist': () => import( '@/views/esindex/index.vue'),
+  'views/esindexedit': () => import( '@/views/esindex/edit.vue'),
+  'views/esindexdetail': () => import( '@/views/esindex/detail.vue'),
 }

+ 112 - 0
vue/src/views/esindex/detail.vue

@@ -0,0 +1,112 @@
+<template>
+  <div class="card-edit">
+    <a-divider orientation="left">主题定义</a-divider>
+    <a-descriptions title="" bordered>
+      <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="井信息详情">
+        {{ dataModel.indexName }}
+      </a-descriptions-item>
+      <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="索引编码">
+        {{ dataModel.indexCode }}
+      </a-descriptions-item>
+      <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="显示类型">
+        {{ dataModel.displayTypeName }}
+      </a-descriptions-item>
+      <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="描述">
+        {{ dataModel.indexDesc }}
+      </a-descriptions-item>
+    </a-descriptions>
+    <a-divider orientation="left">字段定义</a-divider>
+    <a-table :columns="columns" :data-source="fieldData" :scroll="{ x:'100%', y: 500 }" :pagination="false"
+             bordered>
+    </a-table>
+    <a-form-item class="buttom-btns">
+      <a-button @click="onClose">关闭</a-button>
+    </a-form-item>
+  </div>
+</template>
+<script lang="ts">
+import {ref, defineComponent} from 'vue';
+import {get} from "@/api/common";
+import {useTabsViewStore} from "@/store/modules/tabsView";
+import dayjs from "dayjs";
+import type {TableColumnsType} from "ant-design-vue";
+import {getDictionaryItemList} from "@/api/system/dictionary";
+import type {EsIndexfield, EsIndex} from "@/views/esindex/model";
+import {useRoute} from "vue-router";
+import router from "@/router";
+
+export default defineComponent({
+  name: 'subjectDetail',
+  components: {
+  },
+  setup() {
+    const tabsViewStore = useTabsViewStore();
+    const route = useRoute();
+    const fieldData = ref<EsIndexfield[]>([]);
+    const dataModel = ref<EsIndex>({
+      indexName: "",
+      indexCode: "",
+      indexDesc: "",
+      displayType: null,
+      displayTypeName:""
+    });
+    const queryTypeList = ref([{name: '', value: ''}]);
+
+    getDictionaryItemList({code: "queryType"}).then(data => {
+      queryTypeList.value = data;
+    });
+
+    const columns: TableColumnsType = [
+      {
+        title: '序号', width: 80, dataIndex: 'num', key: 'num', align: "center", customRender: ({index}) => {
+          return `${index + 1}`;
+        }
+      },
+      {title: '字段编码', dataIndex: 'fieldCode', key: 'fieldCode', align: "center"},
+      {title: '字段名称', dataIndex: 'fieldName', key: 'fieldName', align: "center"},
+      {
+        title: '是否查询字段', dataIndex: 'isSearchField', key: 'isSearchField', align: "center", customRender: ({record}) =>
+          record.isSearchField == "1" ? "是" : "否"
+      },
+      {
+        title: '查询类型', dataIndex: 'queryTypeId', key: 'queryTypeId', align: "center", customRender: ({record}) =>
+          queryTypeList.value.filter(x => x.value == record.queryTypeId)[0]?.name
+      },
+      {title: '显示排序', dataIndex: 'disOrder', key: 'disOrder', align: "center"},
+      {
+        title: '是否显示', dataIndex: 'isDisplay', key: 'isDisplay', align: "center", customRender: ({record}) =>
+          record.isDisplay == "1" ? "是" : "否"
+      },
+      {title: '操作', key: 'operation', fixed: 'right', width: 120, align: "center"},
+    ];
+    const loadData = (id) => {
+      if (id != undefined) {
+        get('esindex/getEsIndex',
+          {indexId: id}).then(data => {
+          dataModel.value = data;
+        })
+        get('esindex/getFieldList',
+          {indexId: id}).then(data => {
+          fieldData.value = data;
+        })
+      }
+    }
+    const onClose = () => {
+      tabsViewStore.closeCurrentTab(route);
+      router.back();
+    };
+
+    return {
+      loadData, columns, fieldData,
+      onClose,
+      dataModel,
+      dayjs
+    };
+  },
+  created() {
+    const id = history.state.params?.id;
+    this.loadData(id);
+  }
+});
+</script>
+

+ 245 - 0
vue/src/views/esindex/edit.vue

@@ -0,0 +1,245 @@
+<template>
+  <div class="card-edit">
+    <a-spin :spinning="loading">
+      <a-form :model="dataModel" @finish="onFinish" autocomplete="off">
+        <a-divider orientation="left">索引定义</a-divider>
+        <a-row :gutter="24">
+          <a-col :span="8">
+            <a-form-item :label-col="{span:6}" label="索引名称" name="indexName"
+                         :rules="[{ required: true, message: '请填写索引名称!' }]">
+              <a-input v-model:value="dataModel.indexName" placeholder="">
+              </a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-item :label-col="{span:6}" label="索引编码" name="indexCode"
+                         :rules="[{ required: true, message: '请填写索引编码!' }]">
+              <a-input v-model:value="dataModel.indexCode" placeholder="">
+              </a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-item :label-col="{span:6}" label="显示类型" name="displayType"
+                         :rules="[{ required: true, message: '请选择显示类型!' }]">
+              <a-select  v-model:value="dataModel.displayType"
+                        :options="displayTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="8">
+            <a-form-item :label-col="{span:6}" label="描述" name="indexDesc">
+              <a-input v-model:value="dataModel.indexDesc" placeholder="">
+              </a-input>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-divider orientation="left">字段定义</a-divider>
+        <a-row>
+          <a-col :span="24" style="margin-right: 20px;">
+            <div style="float: right;">
+              <Space>
+                <BImportExcel :options="importOptions" @success="onImportSuccess"></BImportExcel>
+                &nbsp;
+                <a-button @click="add()">
+                  <template #icon>
+                    <plus-circle-outlined/>
+                  </template>
+                  新增
+                </a-button>
+              </Space>
+            </div>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col style="margin-bottom: 20px;">
+            <a-table :columns="columns" :data-source="fieldData" :scroll="{ x:'100%', y: 500 }" :pagination="false"
+                     bordered>
+              <template #bodyCell="{ column ,record,index}">
+                <template v-if="column.key === 'operation'">
+                  <a-button type="link" size="small" @click="edit(record)">修改</a-button>
+                  <a-popconfirm placement="leftTop"
+                                title="是否删除数据?"
+                                @confirm="onDelete(index)">
+                    <a-button type="link" size="small">删除</a-button>
+                  </a-popconfirm>
+                </template>
+              </template>
+            </a-table>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="24" style="text-align: right;margin: 20px;">
+            <Space>
+              <a-form-item class="buttom-btns">
+                <a-button @click="onClose">取消</a-button>
+                <a-button type="primary" html-type="submit">提交</a-button>
+              </a-form-item>
+            </Space>
+          </a-col>
+        </a-row>
+      </a-form>
+      <FieldEdit ref="modalRef" :onSave="onFieldSave"></FieldEdit>
+    </a-spin>
+  </div>
+</template>
+
+<script lang="ts">
+import {defineComponent, reactive, ref, toRefs} from 'vue';
+import {useTabsViewStore} from '@/store/modules/tabsView';
+import BUploadFile from "@/components/file/uploadFile.vue";
+import type {TableColumnsType} from 'ant-design-vue';
+import {get, save} from '@/api/common';
+import FieldEdit from "@/views/esindex/fieldedit.vue";
+import {getDictionaryItemList} from "@/api/system/dictionary";
+import type {EsIndexfield, EsIndex} from "@/views/esindex/model";
+import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
+import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
+import {message} from "ant-design-vue";
+
+interface FormState {
+  dataModel: EsIndex;
+}
+
+export default defineComponent({
+  name: 'esIndexEditForm',
+  components: {
+    BUploadFile, FieldEdit,  BImportExcel
+  },
+  setup() {
+    const esIndex: EsIndex = {
+      indexName: "",
+      indexCode: "",
+      indexDesc: "",
+      displayType: null,
+      displayTypeName:""
+    }
+    const formState = reactive<FormState>({dataModel: esIndex});
+    const tabsViewStore = useTabsViewStore();
+    const modalRef = ref();
+    const fieldData = ref<EsIndexfield[]>([]);
+    const displayTypeList = ref([{name: '', value: ''}]);
+    const loading = ref(false);
+    const queryTypeList:any=ref([]);
+    let isEdit = false;
+
+    const onFinish = () => {
+      if (fieldData.value.length == 0) {
+        message.warn("尚未添加任何字段定义。");
+        return;
+      }
+      loading.value = true;
+      save('/esindex/saveEsIndex', {dataModel: formState.dataModel, fieldList: fieldData.value}).then(result => {
+        loading.value = false;
+        if (result) {
+          onClose(1)
+        }
+      });
+    };
+
+    const onClose = (reload: any) => {
+      tabsViewStore.closeCurrentTabByPath("/esindex/edit");
+      tabsViewStore.openTab("/esindex/list", {reload: reload});
+    };
+
+    getDictionaryItemList({code: "displayType"}).then(data => {
+      displayTypeList.value = data;
+    });
+    getDictionaryItemList({code: "queryType"}).then(data => {
+      queryTypeList.value = data;
+    });
+
+    const onFieldSave = async (model: EsIndexfield) => {
+      if (!isEdit) {
+        fieldData.value.push(model);
+      }
+    }
+
+    const columns: TableColumnsType = [
+      {
+        title: '序号', width: 80, dataIndex: 'num', key: 'num', align: "center", customRender: ({index}) => {
+          return `${index + 1}`;
+        }
+      },
+      {title: '字段编码', dataIndex: 'fieldCode', key: 'fieldCode', align: "center"},
+      {title: '字段名称', dataIndex: 'fieldName', key: 'fieldName', align: "center"},
+      {
+        title: '是否查询字段', dataIndex: 'isSearchField', key: 'isSearchField', align: "center", customRender: ({record}) =>
+          record.isSearchField == "1" ? "是" : "否"
+      },
+      {
+        title: '查询类型', dataIndex: 'queryTypeId', key: 'queryTypeId', align: "center", customRender: ({record}) =>
+          queryTypeList.value.filter(x => x.value == record.queryTypeId)[0]?.name
+      },
+      {title: '显示排序', dataIndex: 'disOrder', key: 'disOrder', align: "center"},
+      {
+        title: '是否显示', dataIndex: 'isDisplay', key: 'isDisplay', align: "center", customRender: ({record}) =>
+          record.isDisplay == "1" ? "是" : "否"
+      },
+      {title: '操作', key: 'operation', fixed: 'right', width: 120, align: "center"},
+    ];
+    const importOptions = ref<ImportProps>({
+      title: "导入",
+      url: 'esindex/importData',
+      columns: [
+        {cnName: "字段编码", enName: "fieldCode", width: 100},
+        {cnName: "字段名称", enName: "fieldName", width: 200},
+        {cnName: "字段描述", enName: "fieldDesc", width: 100},
+        {cnName: "数据类型", enName: "dataType", width: 150},
+        {cnName: "查询类型", enName: "queryTypeName", width: 100},
+        {cnName: "显示排序", enName: "disOrder", width: 200},
+        {cnName: "是否查询字段", enName: "isSearchFieldText", width: 200},
+        {cnName: "是否显示", enName: "isDisplayText", width: 100},
+      ],
+      template: {
+        tempFileName: "索引字段导入模板.xlsx",
+        url: '',
+        params: null
+      }
+    });
+    const onImportSuccess = (data: []) => {
+      fieldData.value = fieldData.value.concat(data);
+    }
+
+    const data = ref([]);
+
+    const add = () => {
+      isEdit = false;
+      modalRef.value.show(null);
+    }
+    const edit = (record) => {
+      isEdit = true;
+      modalRef.value.show(record);
+    }
+    const onDelete = (record) => {
+      fieldData.value.splice(record, 1);
+    }
+    const loadData = (id) => {
+      if (id != undefined) {
+        get('esindex/getEsIndex',
+          {indexId: id}).then(data => {
+          formState.dataModel = data;
+        })
+        get('esindex/getFieldList',
+          {indexId: id}).then(data => {
+          fieldData.value = data;
+        })
+      }
+    }
+    return {
+      ...toRefs(formState),
+      onFinish, onFieldSave, onClose, add, onImportSuccess,
+      edit, importOptions,
+      onDelete,
+      loadData,
+      fieldData, columns, loading,displayTypeList,
+      isEdit, data, modalRef,
+    };
+  },
+  created() {
+    const id = history.state.params?.id;
+    this.loadData(id);
+  }
+})
+</script>

+ 160 - 0
vue/src/views/esindex/fieldedit.vue

@@ -0,0 +1,160 @@
+<template>
+  <a-modal
+    :width="1200"
+    v-model:visible="visible"
+    :title="title"
+    :confirm-loading="confirmLoading"
+    :keyboard="false"
+    :footer="null"
+    :mask-closable="false">
+    <Form :ref="modalFormRef" :model="dataModel" @finish="handleOk" autocomplete="off">
+      <a-divider orientation="left">基础信息</a-divider>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="字段编码" name="fieldCode" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请填写字段编码!' }]">
+            <a-input v-model:value="dataModel.fieldCode" placeholder="">
+            </a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="字段名称" name="fieldName" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请填写字段名称!' }]">
+            <a-input v-model:value="dataModel.fieldName" placeholder="">
+            </a-input>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="数据类型" name="dataType" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请选择数据类型!' }]">
+            <a-select ref="select" v-model:value="dataModel.dataType"
+                      :options="DataTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="是否查询字段" name="isSearchField" :label-col="{span:7}">
+            <a-radio-group v-model:value="dataModel.isSearchField">
+              <a-radio :value="1">是</a-radio>
+              <a-radio :value="0">否</a-radio>
+            </a-radio-group>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="查询类型" name="queryTypeId" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请选择查询类型!' }]">
+            <a-select ref="select" v-model:value="dataModel.queryTypeId"
+                      :options="queryTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="显示排序" name="disOrder" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请输入显示排序!' }]">
+            <a-input-number v-model:value="dataModel.disOrder">
+            </a-input-number>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="是否显示" name="isDisplay" :label-col="{span:7}">
+            <a-radio-group v-model:value="dataModel.isDisplay">
+              <a-radio :value="1">是</a-radio>
+              <a-radio :value="0">否</a-radio>
+            </a-radio-group>
+          </a-form-item>
+        </a-col>
+      </a-row>
+
+      <a-row style="height: 20px"></a-row>
+      <a-row type="flex">
+        <a-col :span="24" style="text-align: right;margin-right: 20px;">
+          <a-button type="primary" html-type="submit">提交</a-button>
+        </a-col>
+      </a-row>
+    </Form>
+  </a-modal>
+</template>
+<script lang="ts">
+import {Form} from 'ant-design-vue';
+import {defineComponent, reactive, ref} from "vue";
+import BUploadFile from "@/components/file/uploadFile.vue";
+import type {SelectProps} from "ant-design-vue";
+import {getDictionaryItemList} from "@/api/system/dictionary";
+import type {FormInstance} from 'ant-design-vue';
+import {DataTypeList} from '@/enums/dictions';
+import type {EsIndexfield} from "@/views/esindex/model";
+
+export default defineComponent({
+  name: 'FieldEdit',
+  components: {BUploadFile, Form},
+  props: {
+    onSave: {
+      type: Function,
+      default: null
+    }
+  },
+  setup(props) {
+    const visible = ref<boolean>(false);
+    const confirmLoading = ref<boolean>(false);
+    const modalFormRef = ref<FormInstance>();
+    const defaultValue = reactive<EsIndexfield>({
+      indexName:"",
+      fieldCode: "",
+      fieldName: "",
+      fieldDesc: "",
+      dataType: null,
+      queryTypeId: "",
+      isSearchField: 1,
+      isDisplay:1
+    });
+    const dataModel = ref({...defaultValue});
+    const queryTypeList = ref<SelectProps['options']>();
+    const title = ref();
+
+
+    getDictionaryItemList({code: "queryType"}).then(data => {
+      queryTypeList.value = data;
+    });
+
+    const show = (record: any) => {
+      if (record == null) {
+        record = {...defaultValue};
+      }
+      dataModel.value = record;
+      title.value = "主题字段定义";
+      visible.value = true;
+    };
+
+
+    const handleOk = () => {
+      props.onSave(dataModel.value);
+      visible.value = false;
+    };
+
+    const handleCancel = () => {
+      visible.value = false;
+    };
+
+
+    return {
+      dataModel,
+      modalFormRef,
+      visible, title,
+      confirmLoading,
+      DataTypeList,
+      queryTypeList,
+      show, handleOk, handleCancel,
+    };
+  },
+  mounted() {
+
+  },
+})
+</script>
+

+ 192 - 0
vue/src/views/esindex/index.vue

@@ -0,0 +1,192 @@
+<template>
+  <div class="card-search">
+    <a-form
+      ref="formRef"
+      name="advanced_search"
+      class="ant-advanced-search-form"
+      :model="formState"
+      @finish="onFinish"
+    >
+      <a-row :gutter="24">
+        <a-col :span="6">
+          <a-form-item
+            name="subjectName"
+            label="索引名称"
+            :label-col="{span:6}">
+            <a-input v-model:value="formState.indexName" style="width: 200px"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item
+            name="tabCode"
+            label="索引编码"
+            :label-col="{span:6}">
+            <a-input v-model:value="formState.indexCode" style="width: 200px"></a-input>
+          </a-form-item>
+        </a-col>
+        <a-col  :span="6" style="text-align: left">
+          <a-button type="primary" html-type="submit" @click="onFinish">查询</a-button>
+          <a-button style="margin: 0 8px" @click="() => {formRef.resetFields();loadData()}">重置</a-button>
+        </a-col>
+      </a-row>
+      <a-row class="edit-operation">
+        <a-col :span="24" style="text-align: right">
+          <a-button type="primary" html-type="button" @click="add" functioncode="T010901">新增</a-button>
+          <BExportExcel :title="'导出'" :filename="'索引信息'" :url="'subject/exportSubject'"
+                        :params="{...formState, idList:selectedRowKeys}"></BExportExcel>
+          <a-popconfirm placement="leftTop"
+            title="是否删除数据?"
+            @confirm="onDelete()">
+            <a-button type="primary" style="margin: 0 8px" html-type="button" functioncode="T010904">删除</a-button>
+          </a-popconfirm>
+        </a-col>
+      </a-row>
+    </a-form>
+    <div class="search-result-list">
+      <a-table :columns="columns" :data-source="data" :scroll="{ x:'100%', y: 500 }" :pagination="pagination"
+               :loading="loading"
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+               @change="handleTableChange" :row-key="record=>record.indexId"
+               bordered>
+        <template #bodyCell="{ column,record }">
+          <template v-if="column.key === 'operation'">
+            <a-button type="link" size="small" @click="detail(record.indexId)">查看
+            </a-button>
+            <a-button type="link" size="small" @click="edit(record.indexId)" functioncode="T010903">编辑
+            </a-button>
+          </template>
+        </template>
+      </a-table>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+import {reactive, ref, defineComponent, computed} from 'vue';
+import type {FormInstance} from 'ant-design-vue';
+import type {TableColumnsType, TableProps} from 'ant-design-vue';
+import { get, postdel} from '@/api/common';
+import {useRoute, useRouter} from "vue-router";
+import {useTabsViewStore} from "@/store/modules/tabsView";
+import {message} from "ant-design-vue";
+import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
+import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
+import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
+import {getPaginationTotalTitle} from "@/utils/common";
+import dayjs from "dayjs";
+
+export default defineComponent({
+  name: 'esindexlist',
+  components: {DownOutlined, UpOutlined,BImportExcel,BExportExcel},
+  setup() {
+
+    const route = useRoute();
+    const router = useRouter();
+    const expand = ref(false);
+    const formRef = ref<FormInstance>();
+    const tabsViewStore = useTabsViewStore();
+    const selectedRowKeys =ref([]) ;
+    const formState = reactive({
+      page: 1, rows: 10, indexName: '', indexCode: '',total: 0
+    });
+
+    const columns: TableColumnsType = [
+      {
+        title: '序号',
+        width: 60,
+        dataIndex: 'index',
+        key: 'index',
+        align: "center",
+        customRender: item => `${formState.rows * (formState.page - 1) + item.index + 1}`
+      },
+      {title: '索引名称', width: 140, dataIndex: 'indexName', key: 'indexName',align:"center"},
+      {title: '索引编码', width: 200, dataIndex: 'indexCode', key: 'indexCode',align:"center"},
+      {title: '描述', dataIndex: 'indexDesc', key: '2', width: 150, align: "center"},
+      {title: '显示类型', dataIndex: 'displayTypeName', key: '2', width: 150, align: "center"},
+      {title: '创建时间', dataIndex: 'createTime', key: '3', width: 100, customRender: ({record}) =>
+          record.createTime==null?"": (dayjs(record.createTime).format('YYYY-MM-DD'))},
+      {title: '创建人', dataIndex: 'createdName', key: '5', width: 80},
+      {
+        title: '操作', key: 'operation', width: 100, align: "center"
+      },
+    ];
+
+    const data = ref([]);
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: formState.page,
+      pageSize: formState.rows,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    }));
+    const loading = ref(false);
+
+    const handleTableChange: TableProps['onChange'] = (
+      pag: { pageSize: number; current: number },
+    ) => {
+      formState.page = pag.current;
+      formState.rows = pag.pageSize;
+      loadData();
+    };
+
+    const onFinish = () => {
+      loadData();
+    }
+    const filterOption = (input: string, option: any) => {
+      return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+    };
+    const loadData = async function () {
+      loading.value = true;
+      const result: any = await get('esindex/getList', formState);
+
+      data.value = result.list;
+      formState.total = result.total;
+      loading.value = false;
+    }
+    const onDelete = () => {
+      if (selectedRowKeys.value.length <= 0) {
+        message.warning('请选择需要删除的数据!');
+        return false;
+      }
+      postdel('esindex/delete', selectedRowKeys.value).then(() => {
+        loadData();
+      })
+    };
+    const detail = (key: string) => {
+      tabsViewStore.addTabByPath('/esindex/detail', {id: key});
+    };
+    const add = () => {
+      tabsViewStore.addTabByPath('/esindex/edit', {});
+    };
+    const edit = (key: string) => {
+      tabsViewStore.addTabByPath('/esindex/edit', {id: key});
+    };
+    const onSelectChange = (keys: any) => {
+      selectedRowKeys.value = keys;
+    };
+    return {
+      router,
+      route,
+      expand,
+      formRef,
+      formState,
+      columns,data,loading,selectedRowKeys,
+      pagination,
+      handleTableChange,
+      onSelectChange,
+      onFinish,
+      loadData,
+      detail,
+      add,
+      edit,onDelete,filterOption,
+    };
+  },
+  created() {
+    this.loadData();
+  },
+  activated() {
+    if (history.state.params?.reload)
+      this.loadData();
+  }
+});
+</script>

+ 18 - 0
vue/src/views/esindex/model.ts

@@ -0,0 +1,18 @@
+export interface EsIndex {
+  indexName: string,
+  indexCode: string,
+  indexDesc: string,
+  displayType: number | null,
+  displayTypeName:string
+}
+
+export interface EsIndexfield {
+  indexName: string,
+  fieldCode: string,
+  fieldName: string,
+  fieldDesc: string,
+  dataType: string | null,
+  queryTypeId: string,
+  isSearchField: number,
+  isDisplay: number
+}