对数据插入进行优化重构

This commit is contained in:
qiji4215
2023-09-13 17:53:12 +08:00
parent de0a1e3223
commit c3d9ed5a2f
7 changed files with 379 additions and 250 deletions

View File

@@ -54,7 +54,7 @@ public class OMDBReferenceDataSource implements ITileDataSource {
if(MapParamUtils.getDataLayerEnum()!=null){
sql += " and enable" + MapParamUtils.getDataLayerEnum().getSql();
}else{
sql += " and 1=1";
sql += " and enable>=0";
}
RealmQuery<ReferenceEntity> realmQuery = Realm.getInstance(MapParamUtils.getTaskConfig()).where(ReferenceEntity.class)

View File

@@ -52,7 +52,7 @@ public class OMDBTileDataSource implements ITileDataSource {
if(MapParamUtils.getDataLayerEnum()!=null){
sql += " and enable" + MapParamUtils.getDataLayerEnum().getSql();
}else{
sql += " and 1=1";
sql += " and enable>=0";
}
RealmQuery<RenderEntity> realmQuery = Realm.getInstance(MapParamUtils.getTaskConfig()).where(RenderEntity.class).rawPredicate(sql);