|
@@ -15,25 +15,37 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 认证中心业务服务接口
|
|
|
|
|
|
+ * 认证中心相关接口
|
|
*
|
|
*
|
|
* @Version v1.0
|
|
* @Version v1.0
|
|
*/
|
|
*/
|
|
-@RequestMapping("/api/v1")
|
|
|
|
@RestController
|
|
@RestController
|
|
|
|
+@RequestMapping("/api/v1")
|
|
@Api(tags = "认证中心相关接口")
|
|
@Api(tags = "认证中心相关接口")
|
|
public class UserAuthRestController {
|
|
public class UserAuthRestController {
|
|
@Autowired
|
|
@Autowired
|
|
private UserAuthService userAuthService;
|
|
private UserAuthService userAuthService;
|
|
|
|
|
|
@ApiOperation(value = "登录接口")
|
|
@ApiOperation(value = "登录接口")
|
|
- @RequestMapping(value = "user/login", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
|
|
|
+ @RequestMapping(value = "/user/login", method = {RequestMethod.GET, RequestMethod.POST})
|
|
public Result login(@RequestParam String account, @RequestParam String password, @RequestParam Long rootOrgId) throws Exception {
|
|
public Result login(@RequestParam String account, @RequestParam String password, @RequestParam Long rootOrgId) throws Exception {
|
|
return userAuthService.login(account, password, rootOrgId);
|
|
return userAuthService.login(account, password, rootOrgId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "登出接口")
|
|
|
|
+ @RequestMapping(value = "/user/logout", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
|
+ public Result logout(@RequestHeader String key, @RequestHeader String token) throws Exception {
|
|
|
|
+ return userAuthService.logout(key, token);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "获取用户信息接口")
|
|
|
|
+ @RequestMapping(value = "/user/info", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
|
+ public Result getUserInfo(@RequestHeader String key, @RequestHeader String token) throws Exception {
|
|
|
|
+ return userAuthService.getUserInfo(key, token);
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation(value = "修改密码接口")
|
|
@ApiOperation(value = "修改密码接口")
|
|
- @RequestMapping(value = "user/update/password", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
|
|
|
+ @RequestMapping(value = "/user/update/password", method = {RequestMethod.GET, RequestMethod.POST})
|
|
public Result updatePassword(@RequestHeader String key, @RequestHeader String token, @RequestParam Long userId, @RequestParam String password) throws Exception {
|
|
public Result updatePassword(@RequestHeader String key, @RequestHeader String token, @RequestParam Long userId, @RequestParam String password) throws Exception {
|
|
return userAuthService.updatePassword(key, token, userId, password);
|
|
return userAuthService.updatePassword(key, token, userId, password);
|
|
}
|
|
}
|