Skip to content

Commit

Permalink
Merge pull request #70 from Donut-DONationUTile/feature/donation/giver
Browse files Browse the repository at this point in the history
chore: 자동 기부 실행
  • Loading branch information
Ganghee-Lee-0522 authored Apr 29, 2024
2 parents b54bd12 + 48fc966 commit 00c5199
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface GiftRepository extends JpaRepository<Gift, Long> {
@Query(value = "SELECT SUM(g.price) FROM gift g WHERE g.store = :storeName", nativeQuery = true)
int sumByStoreName(String storeName);

@Query(value = "SELECT * FROM gift g WHERE g.status = :status AND g.is_assigned = false" +
@Query(value = "SELECT * FROM gift g WHERE g.status = :status AND g.is_assigned = false AND g.auto_donation = true" +
"AND g.due_date BETWEEN :startDate AND :endDate", nativeQuery = true)
List<Gift> findAllByNotAssignedAndStatusAndDueDateBetween(String status,LocalDateTime startDate, LocalDateTime endDate);

Expand Down

0 comments on commit 00c5199

Please sign in to comment.