jiangqs
2023-07-07 0ab1b864458f36b294933112824b10b13770915e
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
29
30
31
32
33
34
35
36
package com.ruoyi.system.api.service;
 
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * 用户服务
 *
 * @author jqs
 */
@FeignClient(contextId = "remoteSysStaffService", value = ServiceNameConstants.SYSTEM_SERVICE/*, fallbackFactory = RemoteUserFallbackFactory.class*/)
public interface RemoteSysStaffService
{
    /**
     * 通过用户名查询用户信息
     *
     * @param username 用户名
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/user/info/{username}")
    public R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
    @RequestMapping(value = "/staff/isLeader", method = RequestMethod.POST)
    public boolean isLeader() ;
 
    @GetMapping("/user/dept/{deptId}")
    public R<List<Long>> getUserIds(@PathVariable("deptId") Long deptId);
 
}