package com.ankaibei.workflow.api;


import com.ankaibei.workflow.vo.AreaInfo;
import com.ankaibei.workflow.vo.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "areaApi", url = "${api-url:localhost:8077/api}")
public interface AreaApi {

    /**
     * 根据条件查询行政区域信息
     */
    @GetMapping("/foreign/admin/area/getInfoLikeKeywordsAndSubdistrict")
    List<AreaInfo> getInfoLikeKeywordsAndSubdistrict(@RequestParam("keywords")String keywords,@RequestParam("subdistrict")Integer subdistrict);

    /**
     * 查询所有的省份信息
     */
    @GetMapping("/foreign/admin/area/getProvinces")
    List<AreaInfo> getProvinces();

    /**
     * 根据省份关键字查询城市信息
     */
    @GetMapping("/foreign/admin/area/getCity")
    List<AreaInfo> getCity(@RequestParam("keywords")String keywords);


}
