|
@@ -1,5 +1,6 @@
|
|
package com.zhongzheng.controller.system;
|
|
package com.zhongzheng.controller.system;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
import com.zhongzheng.common.constant.Constants;
|
|
import com.zhongzheng.common.constant.Constants;
|
|
@@ -14,6 +15,7 @@ import com.zhongzheng.framework.web.service.SysPermissionService;
|
|
import com.zhongzheng.framework.web.service.TokenService;
|
|
import com.zhongzheng.framework.web.service.TokenService;
|
|
import com.zhongzheng.modules.system.service.ISysMenuService;
|
|
import com.zhongzheng.modules.system.service.ISysMenuService;
|
|
import com.zhongzheng.modules.system.service.ISysTenantService;
|
|
import com.zhongzheng.modules.system.service.ISysTenantService;
|
|
|
|
+import com.zhongzheng.modules.system.service.ISysUserService;
|
|
import com.zhongzheng.modules.system.vo.SysTenantVo;
|
|
import com.zhongzheng.modules.system.vo.SysTenantVo;
|
|
import com.zhongzheng.modules.user.bo.UserBusinessLoginBo;
|
|
import com.zhongzheng.modules.user.bo.UserBusinessLoginBo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -53,7 +55,8 @@ public class SysLoginController
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ISysTenantService iSysTenantService;
|
|
private ISysTenantService iSysTenantService;
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISysUserService iSysUserService;
|
|
/**
|
|
/**
|
|
* 登录方法
|
|
* 登录方法
|
|
*
|
|
*
|
|
@@ -99,7 +102,8 @@ public class SysLoginController
|
|
public AjaxResult getInfo()
|
|
public AjaxResult getInfo()
|
|
{
|
|
{
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
- SysUser user = loginUser.getUser();
|
|
|
|
|
|
+ SysUser user = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>()
|
|
|
|
+ .eq(SysUser::getUserId, loginUser.getUser().getUserId()).last("limit 1"));
|
|
// 角色集合
|
|
// 角色集合
|
|
Set<String> roles = permissionService.getRolePermission(user);
|
|
Set<String> roles = permissionService.getRolePermission(user);
|
|
// 权限集合
|
|
// 权限集合
|