liusuyi
2025-11-13 9c4b29fdf79de231ebbe15668ad40f6e229f8109
ard-framework/src/main/java/com/ard/framework/aspectj/DataScopeAspect.java
@@ -20,7 +20,7 @@
/**
 * 数据过滤处理
 *
 * @author ruoyi
 * @author ard
 */
@Aspect
@Component
@@ -64,7 +64,16 @@
    }
    protected void handleDataScope(final JoinPoint joinPoint, DataScope controllerDataScope)
    {
    {  /**
     * 自定义权限是否生效 baseEntity中  useStatus为false不使用数据权限
     */
        Object params = joinPoint.getArgs()[0];
        if (StringUtils.isNotNull(params) && params instanceof BaseEntity) {
            BaseEntity baseEntity = (BaseEntity) params;
            if (!baseEntity.getUseDataScope()) {
                return;
            }
        }
        // 获取当前的用户
        LoginUser loginUser = SecurityUtils.getLoginUser();
        if (StringUtils.isNotNull(loginUser))