mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
feat: 添加 Runnable 无返回值重载。
This commit is contained in:
parent
60ed0bf955
commit
7f014a4a2a
@ -60,6 +60,18 @@ public class LogicDeleteManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳过逻辑删除字段处理,直接进行数据库物理操作。
|
||||
*/
|
||||
public static void execWithoutLogicDelete(Runnable runnable) {
|
||||
try {
|
||||
skipLogicDelete();
|
||||
runnable.run();
|
||||
} finally {
|
||||
restoreLogicDelete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳过逻辑删除字段处理。
|
||||
*/
|
||||
|
||||
@ -71,6 +71,18 @@ public class MaskManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳过脱敏处理
|
||||
*/
|
||||
public static void execWithoutMask(Runnable runnable) {
|
||||
try {
|
||||
skipMask();
|
||||
runnable.run();
|
||||
} finally {
|
||||
restoreMask();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳过脱敏处理
|
||||
*/
|
||||
|
||||
@ -46,6 +46,18 @@ public class TenantManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 忽略 tenant 条件
|
||||
*/
|
||||
public static void withoutTenantCondition(Runnable runnable) {
|
||||
try {
|
||||
ignoreTenantCondition();
|
||||
runnable.run();
|
||||
} finally {
|
||||
restoreTenantCondition();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 忽略 tenant 条件
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user