Skip to content

Commit

Permalink
Merge pull request #71 from Hoang-Nguyen-Huy/PBS-70-Feature-Auto-chec…
Browse files Browse the repository at this point in the history
…k-order-and-send-mail-to-remind-customer

[PBS-70][TriNT] fix: fix condition to take order for sending mail
  • Loading branch information
nguyenhcp2004 authored Oct 11, 2024
2 parents 1f8126a + 5e847f7 commit 4e61cac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class PodBookingSystemServerApplication {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
public interface OrderDetailRepository extends JpaRepository<OrderDetail, String> {
List<OrderDetail> findByCustomer_Id(String customerId);

@Query("SELECT o FROM OrderDetail o WHERE FUNCTION('DATE', o.startTime) BETWEEN FUNCTION('DATE', :startOfDay) AND FUNCTION('DATE', :endOfDay)")
@Query("SELECT o FROM OrderDetail o WHERE FUNCTION('DATE', o.startTime) BETWEEN FUNCTION('DATE', :startOfDay) AND FUNCTION('DATE', :endOfDay) AND o.status = 'Successfully'")
List<OrderDetail> findAllOrderDetailsByDay(@Param("startOfDay") LocalDateTime startOfDay, @Param("endOfDay") LocalDateTime endOfDay);
}

0 comments on commit 4e61cac

Please sign in to comment.