feat: 登录认证的类型分为sys/u,对应系统和用户平台
This commit is contained in:
@@ -8,6 +8,7 @@ import org.aspectj.lang.annotation.Before;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.wfc.common.core.constant.UserConstants;
|
||||
import org.wfc.common.core.context.SecurityContextHolder;
|
||||
import org.wfc.common.core.domain.LoginUser;
|
||||
import org.wfc.common.core.text.Convert;
|
||||
import org.wfc.common.core.utils.StringUtils;
|
||||
import org.wfc.common.core.web.domain.BaseEntity;
|
||||
@@ -15,7 +16,6 @@ import org.wfc.common.datascope.annotation.DataScope;
|
||||
import org.wfc.common.security.utils.SecurityUtils;
|
||||
import org.wfc.system.api.domain.SysRole;
|
||||
import org.wfc.system.api.domain.SysUser;
|
||||
import org.wfc.system.api.model.LoginUser;
|
||||
|
||||
/**
|
||||
* 数据过滤处理
|
||||
@@ -66,10 +66,10 @@ public class DataScopeAspect
|
||||
protected void handleDataScope(final JoinPoint joinPoint, DataScope controllerDataScope)
|
||||
{
|
||||
// 获取当前的用户
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
LoginUser<SysUser> loginUser = SecurityUtils.getLoginUser();
|
||||
if (StringUtils.isNotNull(loginUser))
|
||||
{
|
||||
SysUser currentUser = loginUser.getSysUser();
|
||||
SysUser currentUser = loginUser.getUser();
|
||||
// 如果是超级管理员,则不过滤数据
|
||||
if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user