Skip to content

Commit

Permalink
Merge pull request #116 from Team-Tiki/hotfix/#115-time-blocks
Browse files Browse the repository at this point in the history
[HOTFIX] 타임라인 조회 로직 오류 수정
  • Loading branch information
Chan531 authored Jul 19, 2024
2 parents 1d0b71a + fb5ffa5 commit 2a839a6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
public interface TimeBlockRepository extends JpaRepository<TimeBlock, Long> {

@Query(value = "select * from time_block "
+ "where team_id = :teamId and accessible_position = :position and to_char(start_date, 'YYYY-MM') = :date "
+ "where team_id = :teamId and accessible_position = :position and "
+ "(to_char(start_date, 'YYYY-MM') = :date or to_char(end_date, 'YYYY-MM') = :date) "
+ "order by start_date asc", nativeQuery = true)
List<TimeBlock> findByTeamAndAccessiblePositionAndDate(long teamId, String position, String date);
}

0 comments on commit 2a839a6

Please sign in to comment.