|
1 |
| -package com.laigeoffer.pmhub.auth.controller; |
2 |
| - |
3 |
| -import com.laigeoffer.pmhub.api.system.UserFeignService; |
4 |
| -import com.laigeoffer.pmhub.base.core.core.domain.AjaxResult; |
5 |
| -import com.laigeoffer.pmhub.base.core.utils.JsonUtils; |
6 |
| -import lombok.extern.slf4j.Slf4j; |
7 |
| -import org.springframework.web.bind.annotation.GetMapping; |
8 |
| -import org.springframework.web.bind.annotation.PathVariable; |
9 |
| -import org.springframework.web.bind.annotation.RestController; |
10 |
| - |
11 |
| -import javax.annotation.Resource; |
12 |
| - |
13 |
| - |
14 |
| -/** |
15 |
| - * 登录验证 |
16 |
| - * |
17 |
| - * @author canghe |
18 |
| - */ |
19 |
| -@RestController |
20 |
| -@Slf4j |
21 |
| -public class LoginController { |
22 |
| - |
23 |
| - |
24 |
| -// @Autowired |
25 |
| -// private SysLoginService loginService; |
26 |
| - |
27 |
| - @Resource |
28 |
| - private UserFeignService userFeignService; |
29 |
| - |
30 |
| -// @Autowired |
31 |
| -// private ISysMenuService menuService; |
32 |
| -// |
33 |
| -// |
34 |
| -// @Autowired |
35 |
| -// private SysPermissionService permissionService; |
36 |
| - |
37 |
| - |
38 |
| - |
39 |
| - |
40 |
| - |
41 |
| - |
42 |
| -// /** |
43 |
| -// * 登录方法 |
44 |
| -// * |
45 |
| -// * @param loginBody 登录信息 |
46 |
| -// * @return 结果 |
47 |
| -// */ |
48 |
| -// @PostMapping("/login") |
49 |
| -// public AjaxResult login(@RequestBody LoginBody loginBody) { |
50 |
| -// AjaxResult ajax = success(); |
51 |
| -// // 生成令牌 |
52 |
| -// String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), |
53 |
| -// loginBody.getUuid()); |
54 |
| -// ajax.put(Constants.TOKEN, token); |
55 |
| -// return ajax; |
56 |
| -// } |
| 1 | +//package com.laigeoffer.pmhub.auth.controller; |
| 2 | +// |
| 3 | +//import com.laigeoffer.pmhub.api.system.UserFeignService; |
| 4 | +//import com.laigeoffer.pmhub.base.core.core.domain.AjaxResult; |
| 5 | +//import com.laigeoffer.pmhub.base.core.utils.JsonUtils; |
| 6 | +//import lombok.extern.slf4j.Slf4j; |
| 7 | +//import org.springframework.web.bind.annotation.GetMapping; |
| 8 | +//import org.springframework.web.bind.annotation.PathVariable; |
| 9 | +//import org.springframework.web.bind.annotation.RestController; |
| 10 | +// |
| 11 | +//import javax.annotation.Resource; |
| 12 | +// |
| 13 | +// |
| 14 | +///** |
| 15 | +// * 登录验证 |
| 16 | +// * |
| 17 | +// * @author canghe |
| 18 | +// */ |
| 19 | +//@RestController |
| 20 | +//@Slf4j |
| 21 | +//public class LoginController { |
| 22 | +// |
| 23 | +// |
| 24 | +//// @Autowired |
| 25 | +//// private SysLoginService loginService; |
57 | 26 | //
|
58 |
| - /** |
59 |
| - * 获取用户信息 |
60 |
| - * |
61 |
| - * @return 用户信息 |
62 |
| - */ |
63 |
| - @GetMapping("getInfo/{userid}") |
64 |
| - public AjaxResult getInfo(@PathVariable long userid) { |
65 |
| -// SysUser user = SecurityUtils.getLoginUser().getUser(); |
66 |
| - AjaxResult userInfo = userFeignService.getInfo(userid); |
67 |
| - log.info(JsonUtils.toJsonString(userInfo)); |
68 |
| - return userInfo; |
69 |
| - } |
| 27 | +// @Resource |
| 28 | +// private UserFeignService userFeignService; |
70 | 29 | //
|
| 30 | +//// @Autowired |
| 31 | +//// private ISysMenuService menuService; |
| 32 | +//// |
| 33 | +//// |
| 34 | +//// @Autowired |
| 35 | +//// private SysPermissionService permissionService; |
| 36 | +// |
| 37 | +// |
| 38 | +// |
| 39 | +// |
| 40 | +// |
| 41 | +// |
| 42 | +//// /** |
| 43 | +//// * 登录方法 |
| 44 | +//// * |
| 45 | +//// * @param loginBody 登录信息 |
| 46 | +//// * @return 结果 |
| 47 | +//// */ |
| 48 | +//// @PostMapping("/login") |
| 49 | +//// public AjaxResult login(@RequestBody LoginBody loginBody) { |
| 50 | +//// AjaxResult ajax = success(); |
| 51 | +//// // 生成令牌 |
| 52 | +//// String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), |
| 53 | +//// loginBody.getUuid()); |
| 54 | +//// ajax.put(Constants.TOKEN, token); |
| 55 | +//// return ajax; |
| 56 | +//// } |
| 57 | +//// |
71 | 58 | // /**
|
72 |
| -// * 获取路由信息 |
| 59 | +// * 获取用户信息 |
73 | 60 | // *
|
74 |
| -// * @return 路由信息 |
| 61 | +// * @return 用户信息 |
75 | 62 | // */
|
76 |
| -// @GetMapping("getRouters") |
77 |
| -// public AjaxResult getRouters() { |
78 |
| -// Long userId = SecurityUtils.getUserId(); |
79 |
| -// List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId); |
80 |
| -// return success(menuService.buildMenus(menus)); |
| 63 | +// @GetMapping("getInfo/{userid}") |
| 64 | +// public AjaxResult getInfo(@PathVariable long userid) { |
| 65 | +//// SysUser user = SecurityUtils.getLoginUser().getUser(); |
| 66 | +// AjaxResult userInfo = userFeignService.getInfo(userid); |
| 67 | +// log.info(JsonUtils.toJsonString(userInfo)); |
| 68 | +// return userInfo; |
81 | 69 | // }
|
82 |
| - |
83 |
| - |
84 |
| - |
85 |
| -} |
| 70 | +//// |
| 71 | +//// /** |
| 72 | +//// * 获取路由信息 |
| 73 | +//// * |
| 74 | +//// * @return 路由信息 |
| 75 | +//// */ |
| 76 | +//// @GetMapping("getRouters") |
| 77 | +//// public AjaxResult getRouters() { |
| 78 | +//// Long userId = SecurityUtils.getUserId(); |
| 79 | +//// List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId); |
| 80 | +//// return success(menuService.buildMenus(menus)); |
| 81 | +//// } |
| 82 | +// |
| 83 | +// |
| 84 | +// |
| 85 | +//} |
0 commit comments