File tree 2 files changed +11
-1
lines changed
base/src/main/java/com/tinyengine/it/controller
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 41
41
@ RequestMapping ("/app-center/api" )
42
42
@ Tag (name = "区块" )
43
43
public class CanvasController {
44
+ /**
45
+ * The canvas service.
46
+ */
44
47
@ Autowired
45
48
private CanvasService canvasService ;
46
49
Original file line number Diff line number Diff line change 13
13
package com .tinyengine .it .controller ;
14
14
15
15
import com .tinyengine .it .common .base .Result ;
16
+ import com .tinyengine .it .common .context .LoginUserContext ;
16
17
import com .tinyengine .it .model .entity .User ;
17
18
import com .tinyengine .it .service .app .UserService ;
18
19
@@ -42,14 +43,20 @@ public class UserController {
42
43
@ Autowired
43
44
private UserService userService ;
44
45
46
+ /**
47
+ * The loginUserContext service.
48
+ */
49
+ @ Autowired
50
+ private LoginUserContext loginUserContext ;
51
+
45
52
/**
46
53
* Me result.
47
54
*
48
55
* @return the result
49
56
*/
50
57
@ GetMapping ("/user/me" )
51
58
public Result <User > me () {
52
- User user = userService .queryUserById (1 );
59
+ User user = userService .queryUserById (Integer . parseInt ( loginUserContext . getLoginUserId ()) );
53
60
return Result .success (user );
54
61
}
55
62
}
You can’t perform that action at this time.
0 commit comments