package com.cirle.scientific.dao;

import java.math.BigInteger;
import java.util.List;

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

import com.cirle.scientific.po.QkjLiveRemind;


@Repository
public interface QkjLiveRemindDao extends PagingAndSortingRepository<QkjLiveRemind, Long>, JpaSpecificationExecutor<QkjLiveRemind> {

	QkjLiveRemind findByLiveIdAndMemCard(String liveId, String memCard);

    List<QkjLiveRemind> findByLiveId(String liveId);

    @Query(value = "SELECT COUNT(id) FROM qkj_live_remind WHERE live_id = ?1",nativeQuery = true)
    BigInteger findRemindCount(String liveId);
}
