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