package com.lutao.cloud.admin.api.feign;

import com.lutao.cloud.admin.api.entity.SysTenant;
import com.lutao.cloud.common.core.constant.SecurityConstants;
import com.lutao.cloud.common.core.constant.ServiceNameConstants;
import com.lutao.cloud.common.core.util.MessageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**

 * @date 2019/6/19
 * <p>
 * 租户接口
 */
@FeignClient(contextId = "remoteTenantService", value = ServiceNameConstants.UPMS_SERVICE)
public interface RemoteTenantService{

	/**
	 * 查询全部有效租户
	 * @param from 内部标志
	 * @return
	 */
	@GetMapping("/tenant/list")
	MessageInfo<List<SysTenant>> list(@RequestHeader(SecurityConstants.FROM) String from);

}
