summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortanghao <[email protected]>2024-11-21 09:52:51 +0800
committertanghao <[email protected]>2024-11-21 09:52:51 +0800
commitf2efe14ab95cbc20bf054812fe643f0a931bfedd (patch)
treedba3701f63d5d9b8fa3e17e9de5c86217467eeb3
parentcc0acb620b8f7553c363fad7db71ddc1caddfa61 (diff)
fix: 修改校验空值问题
-rw-r--r--cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntityProfilesServiceImpl.java2
-rw-r--r--cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntitySourcesServiceImpl.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntityProfilesServiceImpl.java b/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntityProfilesServiceImpl.java
index 27d3253..28c0bf8 100644
--- a/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntityProfilesServiceImpl.java
+++ b/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntityProfilesServiceImpl.java
@@ -119,7 +119,7 @@ public class EntityProfilesServiceImpl extends ServiceImpl<EntityProfilesDao, En
ValidateUtils.is(entityProfiles.getSourceId()).notNull(RCode.ENTITY_PROFILES_SOURCEID_ISNULL)
.is(entityProfiles.getEntities()).notNull(RCode.ENTITY_PROFILES_ENTITIES_ISNULL);
- if(entityProfiles.getIsBuiltIn().equals(1)){
+ if(ObjectUtil.isNotEmpty(entityProfiles.getIsBuiltIn()) && entityProfiles.getIsBuiltIn().equals(1)){
throw new CNException(RCode.ENTITY_PROFILES_BUILT_IN_ERROR);
}
}
diff --git a/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntitySourcesServiceImpl.java b/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntitySourcesServiceImpl.java
index 9e9921e..7a4cc62 100644
--- a/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntitySourcesServiceImpl.java
+++ b/cn-admin/src/main/java/net/geedge/modules/entity/service/impl/EntitySourcesServiceImpl.java
@@ -310,7 +310,7 @@ public class EntitySourcesServiceImpl extends ServiceImpl<EntitySourcesDao, Enti
.is(entitySources.getLookups()).notNull(RCode.ENTITY_SOURCES_LOOKUPS_ISNULL)
.is(entitySources.getDataFormat()).regex("(json|csv)", RCode.ENTITY_SOURCES_DATAFORMAT_TYPE_ERROR);
- if(entitySources.getIsBuiltIn().equals(1)){
+ if(ObjectUtil.isNotEmpty(entitySources.getIsBuiltIn()) && entitySources.getIsBuiltIn().equals(1)){
throw new CNException(RCode.ENTITY_SOURCES_BUILT_IN_ERROR);
}
List<EntitySources> sources = this.list(new QueryWrapper<EntitySources>().lambda().eq(EntitySources::getName, entitySources.getName())