diff --git a/kernel-d-validator/validator-api-table-unique/src/main/java/cn/stylefeng/roses/kernel/validator/api/validators/unique/service/TableUniqueValueService.java b/kernel-d-validator/validator-api-table-unique/src/main/java/cn/stylefeng/roses/kernel/validator/api/validators/unique/service/TableUniqueValueService.java index 5c3c9390d..91b9bdc92 100644 --- a/kernel-d-validator/validator-api-table-unique/src/main/java/cn/stylefeng/roses/kernel/validator/api/validators/unique/service/TableUniqueValueService.java +++ b/kernel-d-validator/validator-api-table-unique/src/main/java/cn/stylefeng/roses/kernel/validator/api/validators/unique/service/TableUniqueValueService.java @@ -164,7 +164,7 @@ public class TableUniqueValueService { String tenantCode = loginUser.getTenantCode(); // 如果是主数据源可以忽略 - if (tenantCode == null || TenantConstants.MASTER_DATASOURCE_NAME.equals(tenantCode)) { + if (ObjectUtil.isNotEmpty(tenantCode) || TenantConstants.MASTER_DATASOURCE_NAME.equals(tenantCode)) { return originTableName; }