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