|
@ -22,7 +22,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
|
|
@Query("select a from Message a where a.type =1 and a.read= 1 and a.receiver=?1 order by a.czrq desc")
|
|
@Query("select a from Message a where a.type =1 and a.read= 1 and a.receiver=?1 order by a.czrq desc")
|
|
Page<Message> amountUnreadLastByReceiver(String doctor, Pageable pageRequest);
|
|
Page<Message> amountUnreadLastByReceiver(String doctor, Pageable pageRequest);
|
|
|
|
|
|
@Query("select count(a) from Message a where (a.type =2 or a.type =3) and a.read= 1 and a.receiver=?1 ")
|
|
|
|
|
|
@Query("select count(a) from Message a where a.type =2 and a.read= 1 and a.receiver=?1 ")
|
|
int amountUnreadHealthByReceiver(String doctor);
|
|
int amountUnreadHealthByReceiver(String doctor);
|
|
|
|
|
|
@Query("select a from Message a where (a.type =2 or a.type =3) and a.read= 1 and a.receiver=?1 order by a.czrq desc")
|
|
@Query("select a from Message a where (a.type =2 or a.type =3) and a.read= 1 and a.receiver=?1 order by a.czrq desc")
|