update: 同步 RuoYi-Vue-Plus(v4.7.0) 更新

This commit is contained in:
konbai
2023-05-19 23:11:59 +08:00
parent ae5fc22972
commit ddf4145bff
87 changed files with 785 additions and 333 deletions

View File

@@ -10,6 +10,7 @@ import lombok.NoArgsConstructor;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Supplier;
/**
* 数据权限助手
@@ -61,4 +62,32 @@ public class DataPermissionHelper {
InterceptorIgnoreHelper.clearIgnoreStrategy();
}
/**
* 在忽略数据权限中执行
*
* @param handle 处理执行方法
*/
public static void ignore(Runnable handle) {
enableIgnore();
try {
handle.run();
} finally {
disableIgnore();
}
}
/**
* 在忽略数据权限中执行
*
* @param handle 处理执行方法
*/
public static <T> T ignore(Supplier<T> handle) {
enableIgnore();
try {
return handle.get();
} finally {
disableIgnore();
}
}
}