Skip to content

Commit

Permalink
feat: #186 일괄 삽입 질문 number순 정렬 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jaewonLeeKOR committed Sep 26, 2024
1 parent 2074dcf commit 120a3b5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.springframework.transaction.annotation.Transactional;

import java.io.StringReader;
import java.util.Comparator;
import java.util.List;

@Slf4j
Expand Down Expand Up @@ -72,6 +73,7 @@ public Long uploadQuestionByCsv(String text) {
.withType(QuestionInsertDto.class)
.build()
.parse();
questionInsertDtoList.sort(Comparator.comparing(QuestionInsertDto::getQuestionId));
List<Question> questions = questionInsertDtoList.stream()
.map(questionMapper::toQuestionInsertDto)
.toList();
Expand Down

0 comments on commit 120a3b5

Please sign in to comment.