|
@@ -1,15 +1,13 @@
|
|
|
package com.fdkankan.jp.xspace.controller;
|
|
|
|
|
|
|
|
|
+import com.fdkankan.common.util.JwtUtil;
|
|
|
import com.fdkankan.jp.xspace.common.Result;
|
|
|
import com.fdkankan.jp.xspace.dto.LoginDTO;
|
|
|
import com.fdkankan.jp.xspace.service.IUserRoleService;
|
|
|
import com.fdkankan.jp.xspace.service.IUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -44,14 +42,14 @@ public class UserController extends BaseController {
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
-// * 获取用户信息
|
|
|
-// */
|
|
|
-// @RequestMapping(value = "/getUserInfo", method = RequestMethod.POST)
|
|
|
-// public Result getUserInfo() {
|
|
|
-// String username = JwtUtil.getUsername(getToken());
|
|
|
-// return Result.success(userService.getUserInfo(username));
|
|
|
-// }
|
|
|
+ /**
|
|
|
+ * 获取用户信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/getUserInfo")
|
|
|
+ public Result getUserInfo() {
|
|
|
+ String username = JwtUtil.getUsername(getToken());
|
|
|
+ return Result.success(userService.getUserInfo(username));
|
|
|
+ }
|
|
|
//
|
|
|
// /**
|
|
|
// * 查询用户列表
|