|
@@ -126,7 +126,7 @@ public class DataScopeAspect
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isNotBlank(sqlString.toString()))
|
|
|
+ if (StringUtils.isNotBlank(sqlString.toString()) && (joinPoint.getArgs().length>0))
|
|
|
{
|
|
|
Object params = joinPoint.getArgs()[0];
|
|
|
if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
|
|
@@ -147,11 +147,13 @@ public class DataScopeAspect
|
|
|
*/
|
|
|
private void clearDataScope(final JoinPoint joinPoint)
|
|
|
{
|
|
|
- Object params = joinPoint.getArgs()[0];
|
|
|
- if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
|
|
|
- {
|
|
|
- BaseEntity baseEntity = (BaseEntity) params;
|
|
|
- baseEntity.getParams().put(DATA_SCOPE, "");
|
|
|
+ if(joinPoint.getArgs().length>0){
|
|
|
+ Object params = joinPoint.getArgs()[0];
|
|
|
+ if (StringUtils.isNotNull(params) && params instanceof BaseEntity)
|
|
|
+ {
|
|
|
+ BaseEntity baseEntity = (BaseEntity) params;
|
|
|
+ baseEntity.getParams().put(DATA_SCOPE, "");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|