mirror of https://gitee.com/stylefeng/roses
【8.3.4】【tenant】增加一个不进行租户切换的逻辑
parent
c32ca70ffa
commit
58beeaf0e6
|
@ -44,4 +44,12 @@ public interface TenantSwitchApi {
|
||||||
*/
|
*/
|
||||||
<T> T changeTenant(TenantSwitchInfo tenantSwitchInfo, Supplier<T> action);
|
<T> T changeTenant(TenantSwitchInfo tenantSwitchInfo, Supplier<T> action);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 不进行租户切换逻辑,执行相关业务
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @since 2025/5/5 23:02
|
||||||
|
*/
|
||||||
|
<T> T doNoTenantChange(Supplier<T> action);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,9 @@ public class DefaultTenantSwitchImpl implements TenantSwitchApi {
|
||||||
return action.get();
|
return action.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> T doNoTenantChange(Supplier<T> action) {
|
||||||
|
return action.get();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue