Update2 TagService.java

This commit is contained in:
anastasia shulga 2019-04-16 08:21:36 +00:00
parent dbd61ce80c
commit 95f70f425a

View File

@ -23,16 +23,16 @@ public class TagService {
return tags
.stream()
.map(tag -> {
if(tag.getId() != null){
return getExistById(tag);
}else {
Tag existTag = isExistByName(tag.getTagName());
if(existTag != null){
return existTag;
}else{
return create(tag);
}
}
if (tag.getId() != null) {
return getExistById(tag);
} else {
Tag existTag = isExistByName(tag.getTagName());
if (existTag != null) {
return existTag;
} else {
return create(tag);
}
}
}).collect(Collectors.toList());
}