RemoteUserService.java 947 B

12345678910111213141516171819202122232425262728
  1. package com.ruoyi.system.api;
  2. import org.springframework.cloud.openfeign.FeignClient;
  3. import org.springframework.web.bind.annotation.GetMapping;
  4. import org.springframework.web.bind.annotation.PathVariable;
  5. import com.ruoyi.common.core.constant.ServiceNameConstants;
  6. import com.ruoyi.common.core.domain.R;
  7. import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
  8. import com.ruoyi.system.api.model.UserInfo;
  9. /**
  10. * 用户服务
  11. *
  12. * @author ruoyi
  13. */
  14. @FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
  15. public interface RemoteUserService
  16. {
  17. /**
  18. * 通过用户名查询用户信息
  19. *
  20. * @param username 用户名
  21. * @param from 调用标志
  22. * @return 结果
  23. */
  24. @GetMapping(value = "/user/info/{username}")
  25. public R<UserInfo> getUserInfo(@PathVariable("username") String username);
  26. }