IDistrict.java 2.54 KB
package com.dituhui.pea.district;

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.RequestParam;


@FeignClient(value = "district")
public interface IDistrict {

    /**
     * 查询行政区
     *
     * @param admincode
     * @return
     */
    @GetMapping("/district/query")
    public WebResult query(@RequestParam(required = false) String admincode, @RequestParam(required = false) String name,
                           @RequestParam(defaultValue = "0") Integer level, @RequestParam(defaultValue = "false") Boolean includeRegion,
                           @RequestParam(defaultValue = "GCJ02") String coordType, @RequestParam(defaultValue = "0") Integer rarefiedNum,
                           @RequestParam(defaultValue = "0") Integer version, @RequestParam(defaultValue = "false") Boolean custom,
                           @RequestParam(required = false) String ak);

    /**
     * 根据点查询行政区
     *
     * @param points
     * @return
     */
    @GetMapping("/district/queryByPoint")
    public WebResult queryByPoint(@RequestParam String points,
                                  @RequestParam(defaultValue = "1") Integer level, @RequestParam(defaultValue = "false") Boolean includeRegion,
                                  @RequestParam(defaultValue = "GCJ02") String coordType, @RequestParam(defaultValue = "0") Integer rarefiedNum,
                                  @RequestParam(defaultValue = "0") Integer version, @RequestParam(defaultValue = "false") Boolean custom,
                                  @RequestParam(required = false) String ak);

    /**
     * 根据多边形查询行政区
     *
     * @param points
     * @return
     */
    @GetMapping("/district/queryByRegion")
    public WebResult queryByRegion(@RequestParam String points, @RequestParam(required = false) String parts,
                                   @RequestParam(defaultValue = "INTERSECT") String spatialQueryMode,
                                   @RequestParam(defaultValue = "1") Integer level, @RequestParam(defaultValue = "false") Boolean includeRegion,
                                   @RequestParam(defaultValue = "GCJ02") String coordType, @RequestParam(defaultValue = "0") Integer rarefiedNum,
                                   @RequestParam(defaultValue = "0") Integer version, @RequestParam(defaultValue = "false") Boolean custom,
                                   @RequestParam(required = false) String ak);


}