| | |
| | | package com.ard.system.api; |
| | | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.cloud.openfeign.SpringQueryMap; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | import com.ard.system.api.domain.SysUser; |
| | | import com.ard.system.api.factory.RemoteUserFallbackFactory; |
| | | import com.ard.system.api.model.LoginUser; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户服务 |
| | |
| | | * @param source 请求来源 |
| | | * @return 结果 |
| | | */ |
| | | @GetMapping("/user/info/{username}") |
| | | @GetMapping("/api/user/info/{username}") |
| | | public R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | |
| | | * @param source 请求来源 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/user/register") |
| | | @PostMapping("/api/user/register") |
| | | public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | |
| | | * @param source 请求来源 |
| | | * @return 结果 |
| | | */ |
| | | @PutMapping("/user/recordlogin") |
| | | @PutMapping("/api/user/recordlogin") |
| | | public R<Boolean> recordUserLogin(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | |
| | | * @param source 请求来源 |
| | | * @return 用户对象 |
| | | */ |
| | | @GetMapping("/user/info1/{userId}") |
| | | @GetMapping("/api/user/{userId}") |
| | | public R<SysUser> getUserInfoByUserId(@PathVariable("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | | * 通过用户ID查询用户 |
| | | * |
| | | * @param source 请求来源 |
| | | * @return 用户对象 |
| | | */ |
| | | @PostMapping("/api/user/list") |
| | | public R<List<SysUser>> list(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | } |