|
|
@ -159,6 +159,7 @@ public class DataScopeAspect {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
private static void putDataScope(JoinPoint joinPoint, String sql) {
|
|
|
|
private static void putDataScope(JoinPoint joinPoint, String sql) {
|
|
|
|
Object params = joinPoint.getArgs()[0];
|
|
|
|
Object params = joinPoint.getArgs()[0];
|
|
|
|
if (Validator.isNotNull(params)) {
|
|
|
|
if (Validator.isNotNull(params)) {
|
|
|
@ -167,8 +168,8 @@ public class DataScopeAspect {
|
|
|
|
baseEntity.getParams().put(DATA_SCOPE, sql);
|
|
|
|
baseEntity.getParams().put(DATA_SCOPE, sql);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Method getParams = params.getClass().getDeclaredMethod("getParams", null);
|
|
|
|
Method getParams = params.getClass().getDeclaredMethod("getParams");
|
|
|
|
Map<String, Object> invoke = (Map<String, Object>) getParams.invoke(params, null);
|
|
|
|
Map<String, Object> invoke = (Map<String, Object>) getParams.invoke(params);
|
|
|
|
invoke.put(DATA_SCOPE, sql);
|
|
|
|
invoke.put(DATA_SCOPE, sql);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
// 方法未找到 不处理
|
|
|
|
// 方法未找到 不处理
|
|
|
|