数据权限判断对象类型

master
RuoYi 4 years ago
parent 4e32788b36
commit 1af0d1665c
  1. 6
      ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java

@ -142,10 +142,14 @@ public class DataScopeAspect
if (StringUtils.isNotBlank(sqlString.toString()))
{
BaseEntity baseEntity = (BaseEntity) joinPoint.getArgs()[0];
Object params = joinPoint.getArgs()[0];
if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
{
BaseEntity baseEntity = (BaseEntity) params;
baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
}
}
}
/**
* 是否存在注解如果存在就获取

Loading…
Cancel
Save