пофиксил баг
This commit is contained in:
parent
58a5ac294f
commit
cb9ddea57e
@ -22,7 +22,7 @@ telegram-config:
|
||||
bot-username: ${TELEGRAM_BOT_USERNAME}
|
||||
bot-token: ${TELEGRAM_BOT_TOKEN}
|
||||
gitlab-bot:
|
||||
version: 0.0.3 Beta
|
||||
version: 0.0.4 Beta
|
||||
person:
|
||||
telegram-id: ${TELEGRAM_PERSON_ID}
|
||||
token: ${GITLAB_PERSONAL_TOKEN}
|
||||
|
@ -122,6 +122,14 @@ public class NoteParser {
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final Set<Long> newNoteIds = newNotes.stream().map(Task::getId).collect(Collectors.toSet());
|
||||
|
||||
final ExistsContainer<Note, Long> existsNoteContainer = noteService.existsById(newNoteIds);
|
||||
|
||||
if (existsContainer.getContainer() != null && !existsContainer.getContainer().isEmpty()) {
|
||||
noteService.deleteAllById(existsNoteContainer.getContainer().stream().map(Note::getId).collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
final List<Task> newTasks = taskService.createAll(newNotes);
|
||||
newTasks.forEach(task -> noteService.link(task.getId(), mergeRequest.getId()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user