package com.vctgo.system.api;

import com.vctgo.common.core.constant.ServiceNameConstants;
import com.vctgo.common.core.domain.R;
import com.vctgo.system.api.domain.SysAreaSetting;
import com.vctgo.system.api.domain.dto.SysAreaSettingDto;
import com.vctgo.system.api.factory.RemoteAreaFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 用户服务
 *
 * @author vctgo
 */
@FeignClient(contextId = "remoteAreaService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteAreaFallbackFactory.class)
public interface RemoteAreaService {

    /**
     * 全量查询区域列表
     *
     * @return
     */
    @GetMapping("/sysAreaSetting/list/sys")
    R<List<SysAreaSetting>> getSysAreaList();

    @GetMapping("/sysAreaSetting/list/all")
    R<List<SysAreaSetting>> getTenantAreaList(@SpringQueryMap SysAreaSettingDto sysAreaSettingDto);

    @GetMapping("/sysAreaSetting/list/getAreaNameByIds")
    R<List<String>> getAreaNameByIds(@RequestParam("areaIdStr") String areaIdStr);

    @GetMapping("/sysAreaSetting/list/getAreaListByIds")
    R<List<SysAreaSetting>> getAreaListByIds(@RequestParam("areaIdList") List<Long> areaIdList);

}
