package cn.cecep.talroad.feign;

import cn.cecep.talroad.common.core.domain.R;
import cn.cecep.talroad.common.core.web.page.TableDataInfo;
import cn.cecep.talroad.feign.impl.BaseRegionServiceImpl;
import cn.cecep.talroad.vo.SysBasRegion;
import org.springframework.beans.factory.annotation.Qualifier;
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 = "szhpt-system", fallback = BaseRegionServiceImpl.class)
@Qualifier("baseRegionService")
public interface BaseRegionService {

    @GetMapping(value = "/getRegionCodeListChild")
    R<List<String>> getRegionCodeListChild(@RequestParam(value = "regionCode") String regionCode);

    @GetMapping(value = "/dict/data/list")
    TableDataInfo getDictDataList(
            @RequestParam(value = "pageNum") String pageNum,
            @RequestParam(value = "pageSize") String pageSize,
            @RequestParam(value = "dictType") String dictType
    );

    @GetMapping(value = "/getRegionList")
    R<List<SysBasRegion>> getRegionList(@RequestParam(value = "regionCode") String regionCode);
}
