mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-11-14 22:49:33 +08:00
⚡ TenantIdUtil重命名为TenantUtil
This commit is contained in:
parent
d5bfa065ee
commit
c18f3b01d3
@ -41,7 +41,7 @@ public class BladeTenantHandler implements TenantLineHandler {
|
||||
*/
|
||||
@Override
|
||||
public Expression getTenantId() {
|
||||
return new StringValue(Func.toStr(TenantIdUtil.get(), properties.getDefaultTenantId()));
|
||||
return new StringValue(Func.toStr(TenantUtil.getTenantId(), properties.getDefaultTenantId()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,7 +67,7 @@ public class BladeTenantHandler implements TenantLineHandler {
|
||||
(!properties.getTables().isEmpty() && properties.getTables().contains(tableName))
|
||||
|| properties.getBladeTables().contains(tableName)
|
||||
)
|
||||
&& StringUtil.isNotBlank(TenantIdUtil.get())
|
||||
&& StringUtil.isNotBlank(TenantUtil.getTenantId())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import java.util.function.Supplier;
|
||||
* @author L.cm
|
||||
*/
|
||||
@UtilityClass
|
||||
public class TenantIdUtil {
|
||||
public class TenantUtil {
|
||||
private static final ThreadLocal<String> tl = new ThreadLocal<>();
|
||||
|
||||
/**
|
||||
@ -35,7 +35,7 @@ public class TenantIdUtil {
|
||||
*
|
||||
* @return 租户id
|
||||
*/
|
||||
public static String get() {
|
||||
public static String getTenantId() {
|
||||
String tenantId = tl.get();
|
||||
if (tenantId != null) {
|
||||
return tenantId;
|
Loading…
Reference in New Issue
Block a user