jiangqs
2023-07-15 b0b52cbabf7a4bc8e00fc328d14ac05336d0221e
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/service/RemoteSysStaffService.java
@@ -1,36 +1,21 @@
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 com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
 * 用户服务
 *
 * @author jqs
 */
@FeignClient(contextId = "remoteSysStaffService", value = ServiceNameConstants.SYSTEM_SERVICE/*, fallbackFactory = RemoteUserFallbackFactory.class*/)
@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);
}