no message

This commit is contained in:
amentis 2024-04-09 16:30:05 +03:00
parent 02c3ed7563
commit cdae5b2bd3
1 changed files with 18 additions and 4 deletions

View File

@ -168,10 +168,10 @@ public class ReferenceTypeServiceImpl implements ReferenceTypeService {
}else { }else {
ExternalFetcherStaticOptionSourceConfigurationEntity staticEntity = new ExternalFetcherStaticOptionSourceConfigurationEntity(); ExternalFetcherStaticOptionSourceConfigurationEntity staticEntity = new ExternalFetcherStaticOptionSourceConfigurationEntity();
if (!this.conventionService.isListNullOrEmpty(((ExternalFetcherStaticOptionSourceConfigurationPersist) persist).getOptions())){ if (!this.conventionService.isListNullOrEmpty(((ExternalFetcherStaticOptionSourceConfigurationPersist) persist).getItems())){
staticEntity.setOptions(new ArrayList<>()); staticEntity.setItems(new ArrayList<>());
for (StaticOptionPersist optionPersist: ((ExternalFetcherStaticOptionSourceConfigurationPersist) persist).getOptions()) { for (StaticPersist optionPersist: ((ExternalFetcherStaticOptionSourceConfigurationPersist) persist).getItems()) {
staticEntity.getOptions().add(this.buildStaticOptionEntity(optionPersist)); staticEntity.getItems().add(this.buildStaticEntity(optionPersist));
} }
} }
@ -256,6 +256,20 @@ public class ReferenceTypeServiceImpl implements ReferenceTypeService {
return data; return data;
} }
private @NotNull StaticEntity buildStaticEntity(StaticPersist persist){
StaticEntity data = new StaticEntity();
if (persist == null) return data;
if (!this.conventionService.isListNullOrEmpty(persist.getOptions())){
data.setOptions(new ArrayList<>());
for (StaticOptionPersist staticOptionPersist: persist.getOptions()) {
data.getOptions().add(this.buildStaticOptionEntity(staticOptionPersist));
}
}
return data;
}
private @NotNull StaticOptionEntity buildStaticOptionEntity(StaticOptionPersist persist){ private @NotNull StaticOptionEntity buildStaticOptionEntity(StaticOptionPersist persist){
StaticOptionEntity data = new StaticOptionEntity(); StaticOptionEntity data = new StaticOptionEntity();
if (persist == null) return data; if (persist == null) return data;