Skip to content

Commit

Permalink
HOTFIX: 삭제조건 변경2
Browse files Browse the repository at this point in the history
  • Loading branch information
oxdjww committed Nov 15, 2024
1 parent 333324c commit 55cb5a6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public interface ApplicationRepository extends JpaRepository<Application, Long>
@Transactional
@Query("DELETE FROM Application a " +
"WHERE a.accept = 'UNMATCHED' " +
"AND (a.possibleDate.date < CURRENT_DATE) ")
"AND a.possibleDate.id IN (" +
" SELECT pd.id " +
" FROM PossibleDate pd " +
" WHERE pd.date < CURRENT_DATE " +
" OR (pd.date = CURRENT_DATE AND pd.startTime < CURRENT_TIME)" +
")")
void deleteExpiredApplications();
}

0 comments on commit 55cb5a6

Please sign in to comment.