xuhy
2026-03-15 e08f56b973eb0c81e0bad1d00c8ac95ba6206cd4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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("/api/v1/role/getRoleById")
    R<SysRole> getRoleById(@RequestParam("id") Long id);
}