|
@ -60,13 +60,13 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
|
|
|
@Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
|
|
|
int updateHealthIndexMessageByPatient(String doctor, String patient, String type);
|
|
|
|
|
|
@Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,16,17,18,19,20,21,22,23,24) order by a.czrq desc")
|
|
|
@Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,16,17,18,19,20,21,22,23,24,25,26,27) order by a.czrq desc")
|
|
|
List<Message> getSystemMessageUnread(String doctor);
|
|
|
|
|
|
@Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
|
|
|
List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
|
|
|
|
|
|
@Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,301,16,17,18,19,20,21,22,23,24) and (a.del = '1' or a.del is null) ")
|
|
|
@Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,301,16,17,18,19,20,21,22,23,24,25,26,27) and (a.del = '1' or a.del is null) ")
|
|
|
List<Message> getSystemMessage(String doctor, Pageable pageRequest);
|
|
|
|
|
|
@Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
|
|
@ -170,4 +170,15 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
|
|
|
@Modifying
|
|
|
int setSpecialistReadById(Long id);
|
|
|
|
|
|
@Query("select a from Message a where a.read = 1 and a.receiver = ?1 and a.state = 1 and a.type in (24,25,26,27) order by a.czrq desc")
|
|
|
List<Message> getSynergyService(String receiver);
|
|
|
|
|
|
|
|
|
@Query("select a from Message a where a.receiver = ?1 and a.state = 1 and a.type in (24,25,26,27) order by a.czrq desc")
|
|
|
List<Message> getSynergyMessages(String receiver,Pageable pageable);
|
|
|
|
|
|
@Query("update Message a set a.read = 0 where a.receiver = ?1 and a.type in (24,25,26,27)")
|
|
|
@Modifying
|
|
|
int setSynergyMessagesByRead(String doctor);
|
|
|
|
|
|
}
|