|
@@ -133,16 +133,23 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
|
|
|
for (MiGrationRelCode miGrationRelCode: MiGrationRelCode.values()){
|
|
|
QueryCriteria queryCriteria = getQueryCriteria(miGrationRelCode.getCode());
|
|
|
queryCriteria.setSize(MigrationConstant.BATCH_SQL_DATA_COUNT);
|
|
|
- CommonResult<List<ObjectRelation>> admDatas = getAdmDataPage(context,queryCriteria);
|
|
|
- if (admDatas.getResult().equals(DmpResult.SUCCESS) && admDatas.getCount() > queryCriteria.getSize()) {
|
|
|
- long pages = admDatas.getCount() / queryCriteria.getSize() + 1;
|
|
|
+ CommonResult<List<ObjectRelation>> result = getAdmDataPage(context,queryCriteria);
|
|
|
+ if(result == null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ List<ObjectRelation> admData = result.getData();
|
|
|
+ if(CollUtil.isEmpty(admData)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (result.getCount() > MigrationConstant.BATCH_SQL_DATA_COUNT) {
|
|
|
+ long pages = result.getCount() / queryCriteria.getSize() + 1;
|
|
|
for(long i = 2;i < pages; i++){
|
|
|
queryCriteria.setPage(i);
|
|
|
- List<ObjectRelation> admData = getAdmData(context,queryCriteria);
|
|
|
+ result = getAdmDataPage(context,queryCriteria);
|
|
|
+ admData = result.getData();
|
|
|
appendValuesBefore(service,admData,futureList);
|
|
|
}
|
|
|
}else{
|
|
|
- List<ObjectRelation> admData = admDatas.getData();
|
|
|
appendValuesBefore(service,admData,futureList);
|
|
|
}
|
|
|
}
|