Skip to content

Commit 8a1bd93

Browse files
authored
๐ŸŽจ ํ•™๋ถ€๋ชจver ์‹ ์ฒญ ๋ชฉ๋ก ์ตœ์‹ ์ˆœ ์ •๋ ฌ ์ˆ˜์ • (#61)
1 parent 2eeae57 commit 8a1bd93

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

โ€Žsrc/main/java/com/ivory/ivory/repository/ApplyRepository.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@Repository
1212
public interface ApplyRepository extends JpaRepository<Apply, Long> {
13-
List<Apply> findAllByChild_Id(Long childId);
13+
List<Apply> findAllByChild_IdOrderByCreateAtDesc(Long childId);
1414
Optional<Apply> findById (Long applyId);
1515
Apply findFirstByChild_IdOrderByCreateAt(Long childID);
1616
Optional<Apply> findFirstByStatusOrderByCreateAtDesc(Status status);

โ€Žsrc/main/java/com/ivory/ivory/service/ApplyService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public CustomApiResponse<?> getApplyList(Long childId, Long currentMemberId) {
121121
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "๋ณธ์ธ ์ž๋…€์˜ ์‹ ์ฒญ ๋‚ด์—ญ๋งŒ ์กฐํšŒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.");
122122
}
123123

124-
List<Apply> applyList = applyRepository.findAllByChild_Id(child.get().getId());
124+
List<Apply> applyList = applyRepository.findAllByChild_IdOrderByCreateAtDesc(child.get().getId());
125125

126126
//์‘๋‹ต dto ์ƒ์„ฑ
127127
List<ApplyListDto> applyListDto = new ArrayList<>();

0 commit comments

Comments
ย (0)