mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-11-15 06:59:29 +08:00
⚡ TenantIdUtil重命名为TenantUtil
This commit is contained in:
parent
d5bfa065ee
commit
c18f3b01d3
@ -41,7 +41,7 @@ public class BladeTenantHandler implements TenantLineHandler {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Expression getTenantId() {
|
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.getTables().isEmpty() && properties.getTables().contains(tableName))
|
||||||
|| properties.getBladeTables().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
|
* @author L.cm
|
||||||
*/
|
*/
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public class TenantIdUtil {
|
public class TenantUtil {
|
||||||
private static final ThreadLocal<String> tl = new ThreadLocal<>();
|
private static final ThreadLocal<String> tl = new ThreadLocal<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +35,7 @@ public class TenantIdUtil {
|
|||||||
*
|
*
|
||||||
* @return 租户id
|
* @return 租户id
|
||||||
*/
|
*/
|
||||||
public static String get() {
|
public static String getTenantId() {
|
||||||
String tenantId = tl.get();
|
String tenantId = tl.get();
|
||||||
if (tenantId != null) {
|
if (tenantId != null) {
|
||||||
return tenantId;
|
return tenantId;
|
Loading…
Reference in New Issue
Block a user