Skip to content

Commit

Permalink
解决service循环依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
李鹏军 committed Sep 20, 2023
1 parent 14263a2 commit 34b0f14
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.platform.service.impl;

import com.platform.dao.SysRoleDao;
import com.platform.dao.SysUserDao;
import com.platform.entity.SysUserEntity;
import com.platform.entity.UserWindowDto;
import com.platform.page.Page;
import com.platform.page.PageHelper;
import com.platform.service.SysRoleService;
import com.platform.service.SysUserRoleService;
import com.platform.service.SysUserService;
import com.platform.utils.Constant;
Expand Down Expand Up @@ -37,7 +37,7 @@ public class SysUserServiceImpl implements SysUserService {
@Autowired
private SysUserRoleService sysUserRoleService;
@Autowired
private SysRoleService sysRoleService;
private SysRoleDao sysRoleDao;

@Override
public List<String> queryAllPerms(Long userId) {
Expand Down Expand Up @@ -126,7 +126,7 @@ private void checkRole(SysUserEntity user) {
}

//查询用户创建的角色列表
List<Long> roleIdList = sysRoleService.queryRoleIdList(user.getCreateUserId());
List<Long> roleIdList = sysRoleDao.queryRoleIdList(user.getCreateUserId());

//判断是否越权
if (!roleIdList.containsAll(user.getRoleIdList())) {
Expand Down

0 comments on commit 34b0f14

Please sign in to comment.