RemoteUserService.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.boman.system.api;
  2. import com.boman.system.api.domain.SysUser;
  3. import org.springframework.cloud.openfeign.FeignClient;
  4. import org.springframework.web.bind.annotation.GetMapping;
  5. import org.springframework.web.bind.annotation.PathVariable;
  6. import com.boman.common.core.constant.ServiceNameConstants;
  7. import com.boman.common.core.domain.R;
  8. import com.boman.system.api.factory.RemoteUserFallbackFactory;
  9. import com.boman.system.api.model.LoginUser;
  10. import org.springframework.web.bind.annotation.PostMapping;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import java.util.List;
  13. /**
  14. * 用户服务
  15. *
  16. * @author ruoyi
  17. */
  18. @FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
  19. public interface RemoteUserService
  20. {
  21. /**
  22. * 通过用户名查询用户信息
  23. *
  24. * @param username 用户名
  25. * @return 结果
  26. */
  27. @GetMapping(value = "/user/info/{username}")
  28. public R<LoginUser> getUserInfo(@PathVariable("username") String username);
  29. /**
  30. * 部门下所有人
  31. *
  32. * @param deptIdList deptIdList
  33. * @return 结果
  34. */
  35. @PostMapping("/user/listByDeptId")
  36. List<SysUser> listByDeptId(@RequestBody List<Long> deptIdList);
  37. }