feat: 添加 Runnable 无返回值重载。

This commit is contained in:
Suomm 2023-09-06 18:02:54 +08:00
parent 60ed0bf955
commit 7f014a4a2a
3 changed files with 36 additions and 0 deletions

View File

@ -60,6 +60,18 @@ public class LogicDeleteManager {
}
}
/**
* 跳过逻辑删除字段处理直接进行数据库物理操作
*/
public static void execWithoutLogicDelete(Runnable runnable) {
try {
skipLogicDelete();
runnable.run();
} finally {
restoreLogicDelete();
}
}
/**
* 跳过逻辑删除字段处理
*/

View File

@ -71,6 +71,18 @@ public class MaskManager {
}
}
/**
* 跳过脱敏处理
*/
public static void execWithoutMask(Runnable runnable) {
try {
skipMask();
runnable.run();
} finally {
restoreMask();
}
}
/**
* 跳过脱敏处理
*/

View File

@ -46,6 +46,18 @@ public class TenantManager {
}
}
/**
* 忽略 tenant 条件
*/
public static void withoutTenantCondition(Runnable runnable) {
try {
ignoreTenantCondition();
runnable.run();
} finally {
restoreTenantCondition();
}
}
/**
* 忽略 tenant 条件