Created director user and get API for email log

This commit is contained in:
rajesh
2025-11-07 18:10:43 +05:30
parent 6600c5b319
commit 98cdda457d
16 changed files with 430 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ package net.gepafin.tendermanagement.repositories;
import net.gepafin.tendermanagement.entities.EmailLogEntity;
import net.gepafin.tendermanagement.entities.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
import java.util.Optional;
@@ -23,6 +24,10 @@ public interface EmailLogRepository extends JpaRepository<EmailLogEntity,Long> {
String sendStatus
);
@Query(value = """
SELECT DISTINCT ON (user_action_id) * FROM email_log WHERE send_status = 'PENDING' AND is_deleted = false AND email_service_type = 'PEC_SERVICE' """, nativeQuery = true)
List<EmailLogEntity> findPendingPECEmailLogs();
}