Skip to content

Commit

Permalink
Merge pull request #54 from Kusitms-POPTATO-DEV/fix/histories-complet…
Browse files Browse the repository at this point in the history
…edDatetime

fix: 기록페이지 충돌 수정
  • Loading branch information
pkl0912 authored Nov 28, 2024
2 parents 3ee76db + 1f097af commit ec83903
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.List;
import java.util.Optional;

import static org.hibernate.query.sqm.tree.SqmNode.log;
import static server.poptato.category.exception.errorcode.CategoryExceptionErrorCode.CATEGORY_NOT_EXIST;
import static server.poptato.emoji.exception.errorcode.EmojiExceptionErrorCode.EMOJI_NOT_EXIST;
import static server.poptato.todo.exception.errorcode.TodoExceptionErrorCode.COMPLETED_DATETIME_NOT_EXIST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ List<Todo> findCompletedTodayByUserIdOrderByCompletedDateTimeAsc(
" SELECT c.todoId FROM CompletedDateTime c " +
" WHERE DATE(c.dateTime) = :localDate" +
") AND t.userId = :userId " +
"ORDER BY (SELECT c.dateTime FROM CompletedDateTime c WHERE c.todoId = t.id) ASC")
"ORDER BY (" +
" SELECT c.dateTime FROM CompletedDateTime c " +
" WHERE c.todoId = t.id AND DATE(c.dateTime) = :localDate" +
") ASC")
Page<Todo> findTodosByUserIdAndCompletedDateTime(@Param("userId") Long userId,
@Param("localDate") LocalDate localDate, Pageable pageable);

Expand Down

0 comments on commit ec83903

Please sign in to comment.