package com.xiaopeng.api.feignClient.account;
|
|
|
import com.xiaopeng.api.factory.account.SysRoleClientFallbackFactory;
|
import com.xiaopeng.api.model.account.SysRole;
|
import com.xiaopeng.common.core.domain.R;
|
import com.xiaopeng.common.core.dto.ServiceNameConstantsEnum;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
/**
|
* 角色Feign客户端
|
*/
|
@FeignClient(contextId = "SysRoleClient",
|
value = ServiceNameConstantsEnum.XP_ACCOUNT_SERVICE,
|
fallbackFactory = SysRoleClientFallbackFactory.class)
|
public interface SysRoleClient {
|
|
|
/**
|
* 根据id获取角色信息
|
* @param id
|
* @return
|
*/
|
@PostMapping("/logan/api/v1/role/getRoleById")
|
R<SysRole> getRoleById(@RequestParam("id") Long id);
|
}
|