he2802 2 년 전
부모
커밋
12b1430695
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      zhongzheng-admin-saas/src/main/java/com/zhongzheng/controller/system/SuperSysLoginController.java

+ 6 - 0
zhongzheng-admin-saas/src/main/java/com/zhongzheng/controller/system/SuperSysLoginController.java

@@ -12,6 +12,7 @@ import com.zhongzheng.framework.web.service.TopSysPermissionService;
 import com.zhongzheng.framework.web.service.TopTokenService;
 import com.zhongzheng.modules.top.user.domain.TopSysMenu;
 import com.zhongzheng.modules.top.user.service.ITopSysMenuService;
+import com.zhongzheng.modules.top.user.service.ITopSysRoleService;
 import com.zhongzheng.modules.top.user.service.ITopSysUserService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -54,6 +55,9 @@ public class SuperSysLoginController
 
     @Autowired
     private ITopSysUserService userService;
+
+    @Autowired
+    private ITopSysRoleService iTopSysRoleService;
     /**
      * 登录方法
      *
@@ -89,10 +93,12 @@ public class SuperSysLoginController
         Set<String> roles = permissionService.getRolePermission(user);
         // 权限集合
         Set<String> permissions = permissionService.getMenuPermission(user);
+        List<Integer> rolesId = iTopSysRoleService.selectRoleListByUserId(user.getUserId());
         Map<String,Object> map = new HashMap<>();
         map.put("user", user);
         map.put("roles", roles);
         map.put("permissions", permissions);
+        map.put("rolesId", rolesId);
 
         return AjaxResult.success(map);