package com.xunmei.system.api;

import com.xunmei.common.core.constant.SecurityConstants;
import com.xunmei.common.core.constant.ServiceNameConstants;
import com.xunmei.common.core.domain.IdName;
import com.xunmei.common.core.vo.IdNameVo;
import com.xunmei.system.api.Eto.RoleConditionEto;
import com.xunmei.system.api.domain.SysRole;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author :LuoWei
 * @date : 2023/8/25
 */
@FeignClient(contextId = "remoteRoleService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteRoleService {

    @GetMapping("/role/getRoleById")
    SysRole getRoleById(@RequestParam("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping("/role/getNames")
    List<IdNameVo> getNames(RoleConditionEto condition);
}
