IArea.java 4.11 KB
package com.dituhui.pea.gis;

import com.dituhui.pea.pojo.AreaRequest;
import com.dituhui.pea.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 IArea {

    /**
     * 添加面
     * @param area
     * @return
     */
    @PostMapping("/gis/area/add")
    public WebResult<String> add(@RequestBody AreaRequest area);

    /**
     * 根据用户自定义id修改面
     * @param area
     * @return
     */
    @PostMapping("/gis/area/updateByCustomId")
    public WebResult<Boolean> updateByCustomId(@RequestBody AreaRequest area);

    /**
     * 根据id修改面
     * @param area
     * @return
     */
    @PostMapping("/gis/area/updateById")
    public WebResult<Boolean> updateById(@RequestBody AreaRequest area);

    /**
     * 根据用户自定义id删除面
     * @return
     */
    @PostMapping("/gis/area/delByCustomId")
    public WebResult<Boolean> delByCustomId(@RequestParam String teamId, @RequestParam(required = false) boolean contract, @RequestParam String mapId, @RequestParam String layerCode, @RequestParam String customId);

    /**
     * 根据id删除面
     * @return
     */
    @PostMapping("/gis/area/delById")
    public WebResult<Boolean> delById(@RequestParam String teamId, @RequestParam(required = false) boolean contract, @RequestParam String mapId, @RequestParam String id);

    /**
     * 根据用户自定义id获取面
     * @return
     */
    @GetMapping("/gis/area/getByCustomId")
    public WebResult getByCustomId(@RequestParam String teamId, @RequestParam(required = false) boolean contract,
                                   @RequestParam String mapId, @RequestParam String layerCode, @RequestParam String customId,
                                   @RequestParam(defaultValue = "true") boolean includeGeo, @RequestParam(defaultValue = "gcj02") String coordType);

    /**
     * 根据用户自定义id获取面
     * @return
     */
    @GetMapping("/gis/area/getById")
    public WebResult getById(@RequestParam String teamId, @RequestParam(required = false) boolean contract, @RequestParam String id,
                             @RequestParam String mapId, @RequestParam(defaultValue = "true") boolean includeGeo, @RequestParam(defaultValue = "gcj02") String coordType);

    @GetMapping("/gis/area/search")
    public WebResult search(@RequestParam String teamId, @RequestParam(required = false) boolean contract, @RequestParam String mapId,
                            @RequestParam(defaultValue = "0") Integer pageNum, @RequestParam(defaultValue = "0") Integer pageSize, @RequestParam(required = false) String layerCode,
                            @RequestParam(required = false) String customQuerys, @RequestParam(defaultValue = "And") String compositeType,
                            @RequestParam(required = false) List<String> fieldNames, @RequestParam(defaultValue = "true") Boolean includeGeo,
                            @RequestParam(defaultValue = "gcj02") String coordType, @RequestParam(required = false) String orders);

    /**
     * 拆分面
     * @return
     */
    @PostMapping("/gis/area/split")
    public WebResult<String> split(@RequestBody AreaRequest area);

    /**
     * 合并面
     * @return
     */
    @PostMapping("/gis/area/union")
    public WebResult<Boolean> union(@RequestBody AreaRequest area);

    /**
     * 创建表(单独用户)
     * @return
     */
    @PostMapping("/gis/area/createDataset")
    public WebResult<Boolean> create(@RequestParam String teamId, @RequestParam(defaultValue = "true") boolean common);

    /**
     * 根据图层删除
     * @return
     */
    @PostMapping("/gis/area/deleteByLayerCode")
    public WebResult<Long> deleteByLayerCode(@RequestParam String teamId, @RequestParam(required = false) boolean contract,
                                                @RequestParam String mapId, @RequestParam String layerCode);
}