package com.yeejoin.amos.maintenance.business.dao.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.yeejoin.amos.maintenance.dao.entity.Msg;
@Repository("iMsgDao")
public interface IMsgDao extends BaseDao<Msg, Long>{
	@Query(value = "select  count(1) from p_msg where user_id = ?1 and is_read = 0", nativeQuery = true)
	int countByUserId(String userId);

	List<Msg> findAllByIsImmediatelyFalse();

	List<Msg> findAllByIsImmediatelyTrueAndStatus(int status);
}
