审查视图

src/main/java/com/sunyo/wlpt/dispatch/fegin/GetUserFegin.java 1012 字节
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package com.sunyo.wlpt.dispatch.fegin;

import com.github.pagehelper.PageInfo;
import com.sunyo.wlpt.dispatch.response.ResultJson;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 子诚
 * Description:
 * 时间:2020/5/8 16:06
 */
16
@FeignClient(value = "cloud-user-center", fallback = GetUserFeginHystrix.class)
17 18 19 20 21
@Service
public interface GetUserFegin {
    /**
     * 根据用户名获取到 CLOUD-USER-CENTER 服务中的用户的信息
     *
王勇 authored
22
     * @param userName 用户名称
23 24 25 26 27 28 29
     * @return
     */
    @GetMapping("/user/list")
    public ResultJson<PageInfo> list(@RequestParam(value = "userName", required = false) String userName,
                                     @RequestHeader(name = "Authorization", required = true) String token
    );
}