|
|
@@ -18,10 +18,13 @@ public interface TbUserMsgRepository extends JpaRepository<TbUserMsg, Long>, Jpa
|
|
|
@Query("select p from TbUserMsg p")
|
|
|
List<TbUserMsg> findAllList();
|
|
|
|
|
|
- @Query("select p from TbUserMsg p where p.msgNmbr in (select t.msgNmbr from TbUserMsgTo t where t.userId = :userId and t.cnfmYn = 'N') and p.strDt >= to_char(sysdate, 'YYYYMMDDHH24MISS') and p.endDt <= to_char(sysdate, 'YYYYMMDDHH24MISS')")
|
|
|
+ @Query("select p from TbUserMsg p where p.msgNmbr in (select t.msgNmbr from TbUserMsgTo t where t.userId = :userId and t.cnfmYn = 'N') and p.strDt <= to_char(sysdate, 'YYYYMMDDHH24MISS') and p.endDt >= to_char(sysdate, 'YYYYMMDDHH24MISS')")
|
|
|
List<TbUserMsg> findAllListNotify(@Param("userId") String userId);
|
|
|
|
|
|
@Query("select p from TbUserMsg p where p.regDt between :fromDt and :toDt")
|
|
|
List<TbUserMsg> findAllListHistory(@Param("fromDt") String fromDt, @Param("toDt") String toDt);
|
|
|
|
|
|
+ @Query(value = "SELECT NVL(MAX(MSG_NMBR), 0) + 1 AS NEWID FROM TB_USER_MSG", nativeQuery = true)
|
|
|
+ Long getNewMsgNmbr();
|
|
|
+
|
|
|
}
|