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.SysTenant;
import com.vctgo.system.api.factory.RemoteTenantFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

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

    /**
     * 全量查询租户管理列表
     *
     * @return
     */
    @GetMapping("/tenant/all/list")
    R<List<SysTenant>> allTenantList();

    /**
     * 条件查询租户管理列表
     *
     * @return
     */
    @GetMapping("/tenant/toyService/bi")
    R<List<SysTenant>> getTenantList(@RequestParam("sysTenant") String sysTenant);
}
