RemoteUserService.java 890 字节
package cn.brotop.system.api;

import cn.brotop.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import cn.brotop.common.core.constant.ServiceNameConstants;
import cn.brotop.common.core.domain.R;
import cn.brotop.system.api.model.LoginUser;

/**
 * 用户服务
 * 
 * @author 啊雷
 */
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteUserService
{
    /**
     * 通过用户名查询用户信息
     *
     * @param username 用户名
     * @return 结果
     */
    @GetMapping(value = "/user/info/{username}")
    public R<LoginUser> getUserInfo(@PathVariable("username") String username);
}