IExtendColumn.java 5.41 KB
package com.dituhui.mp.gis;

import com.dituhui.mp.pojo.ExtendColumnInfo;
import com.dituhui.mp.pojo.ExtendColumnMetaInfo;
import com.dituhui.mp.pojo.WebResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "gis")
public interface IExtendColumn {

    /**
     * 添加表头
     *
     * @param ecmInfo
     * @return
     */
    @PostMapping(value = "/gis/ec/addMetadata")
    public WebResult<Boolean> addMetadata(@RequestBody ExtendColumnMetaInfo ecmInfo);

    /**
     * 检查表头
     *
     * @param ecmInfo
     * @return
     */
    @PostMapping(value = "/gis/ec/existMetadata")
    public WebResult<Boolean> existMetadata(@RequestBody ExtendColumnMetaInfo ecmInfo);

    /**
     * 检查系统字段
     *
     * @param ecmInfo
     * @return
     */
    @PostMapping(value = "/gis/ec/existSystemMetadata")
    public WebResult<Boolean> existSystemMetadata(@RequestBody ExtendColumnMetaInfo ecmInfo);

    /**
     * 批量添加表头
     *
     * @param ecmInfo
     * @return
     */
    @PostMapping(value = "/gis/ec/addMetadatas")
    public WebResult<Boolean> addMetadatas(@RequestBody List<ExtendColumnMetaInfo> ecmInfo);

    /**
     * 修改表头字段名
     *
     * @param ecmInfo
     * @return
     */
    @PostMapping(value = "/gis/ec/updateMetadata")
    WebResult<Boolean> updateMetadata(@RequestBody ExtendColumnMetaInfo ecmInfo);

    /**
     * 删除表头
     *
     * @param ecmInfo
     * @return
     */
    @PostMapping(value = "/gis/ec/deleteMetadataByName")
    WebResult<Boolean> deleteMetadataByName(@RequestBody ExtendColumnMetaInfo ecmInfo);

    /**
     * 获取所有表头
     *
     * @return
     */
    @GetMapping(value = "/gis/ec/getAllMetadata")
    WebResult getAllMetadata(@RequestParam(required = false) boolean contract, @RequestParam String teamId,
                             @RequestParam String mapId, @RequestParam String layerCode);

    /**
     * 删除图层下所有表头
     *
     * @return
     */
    @PostMapping(value = "/gis/ec/deleteAllMetadata")
    WebResult deleteAllMetadata(@RequestParam(required = false) boolean contract, @RequestParam String teamId,
                                @RequestParam String mapId, @RequestParam String layerCode);

    /**
     * 获取指定名称表头
     *
     * @return
     */
    @GetMapping(value = "/gis/ec/getMetadataByName")
    WebResult getMetadataByName(@RequestParam(required = false) boolean contract, @RequestParam String teamId,
                                @RequestParam String mapId, @RequestParam String layerCode, @RequestParam String fieldName);

    /**
     * 全局搜索
     * 查询条件所属图层加在查询条件里面,精确匹配
     * filters searchTree 二选一
     * @param filters 简单过滤
     * @param searchTree 复杂条件
     * @param orders 排序,复杂条件下才能排序
     * @param keyword 关键词搜索,orders排序存在时无效
     * @return
     */
    @GetMapping(value = "/gis/ec/searchGlobal")
    WebResult searchGlobal(@RequestParam(required = false) boolean contract, @RequestParam String teamId, @RequestParam String mapId,
                           @RequestParam(required = false) String keyword, @RequestParam(required = false) String filters,
                           @RequestParam(required = false) String searchTree, @RequestParam(required = false) List<String> fieldNames,
                           @RequestParam(defaultValue = "0") Integer pageSize, @RequestParam(defaultValue = "0") Integer pageNum, @RequestParam(required = false) String orders);


    /**
     * 搜索
     *
     * @return
     */
    @GetMapping(value = "/gis/ec/search")
    WebResult search(@RequestParam(required = false) boolean contract, @RequestParam String teamId, @RequestParam String mapId,
                     @RequestParam(required = false) String layerCode, @RequestParam(required = false) String keyword,
                     @RequestParam(required = false) String filters, @RequestParam(required = false) String searchTree,
                     @RequestParam(required = false) List<String> fieldNames,
                     @RequestParam(defaultValue = "0") Integer pageSize, @RequestParam(defaultValue = "0") Integer pageNum, @RequestParam(required = false) String orders);

    /**
     * 创建系统字段
     *
     * @param ecmInfo
     * @return
     */
    @PostMapping(value = "/gis/ec/createSystemMetadata")
    WebResult<Boolean> createMetadata(@RequestBody ExtendColumnMetaInfo ecmInfo);

    /**
     * 创建自定义字段
     *
     * @return
     */
    @PostMapping(value = "/gis/ec/addExtendColumn")
    WebResult<Boolean> addExtendColumn(@RequestBody ExtendColumnInfo ecInfo);

    /**
     * 修改自定义字段
     *
     * @return
     */
    @PostMapping(value = "/gis/ec/updateExtendColumn")
    WebResult<Boolean> updateExtendColumn(@RequestBody ExtendColumnInfo ecInfo);

    /**
     * 根据地图id删除索引属性数据
     *
     * @return
     */
    @PostMapping(value = "/gis/ec/deleteByMapId")
    WebResult<Boolean> deleteByMapId(@RequestParam(required = false) boolean contract, @RequestParam String teamId,
                                          @RequestParam String mapId);
}