RemoteUserService.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package com.boman.system.api;
  2. import com.boman.domain.SysUser;
  3. import com.boman.domain.dto.AjaxResult;
  4. import org.springframework.cloud.openfeign.FeignClient;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import com.boman.domain.constant.ServiceNameConstants;
  8. import com.boman.domain.dto.R;
  9. import com.boman.system.api.factory.RemoteUserFallbackFactory;
  10. import com.boman.system.api.model.LoginUser;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import java.util.List;
  14. /**
  15. * 用户服务
  16. *
  17. * @author ruoyi
  18. */
  19. @FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
  20. public interface RemoteUserService
  21. {
  22. /**
  23. * 通过用户名查询用户信息
  24. *
  25. * @param username 用户名
  26. * @return 结果
  27. */
  28. @GetMapping(value = "/user/info/{username}")
  29. public R<LoginUser> getUserInfo(@PathVariable("username") String username);
  30. /**
  31. * 部门下所有人
  32. *
  33. * @param deptIdList deptIdList
  34. * @return 结果
  35. */
  36. @PostMapping("/user/listByDeptId")
  37. List<SysUser> listByDeptId(@RequestBody List<Long> deptIdList);
  38. /**
  39. * 查询所有用户
  40. * @return
  41. */
  42. @GetMapping("/userListAll")
  43. List<SysUser> selectUserListAll();
  44. @PostMapping("/user/updateUnionId")
  45. public AjaxResult updateUnionId(@RequestBody SysUser sysUser);
  46. /**
  47. * 功能描述: queryByOpenId
  48. *
  49. * @param openId openId
  50. * @return com.boman.domain.SysUser
  51. */
  52. @GetMapping("user/queryByOpenId/{openId}")
  53. SysUser queryByOpenId(@PathVariable("openId") String openId);
  54. /**
  55. * 功能描述: getByPhone
  56. *
  57. * @param phone phone
  58. * @return com.boman.domain.SysUser
  59. */
  60. @GetMapping("user/getByPhone/{phone}")
  61. SysUser getByPhone(@PathVariable("phone") String phone);
  62. @PostMapping("user/packInfo")
  63. LoginUser packInfo(@RequestBody SysUser sysUser);
  64. }