package com.cirle.scientific.dao;

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.QkjLiveComments;


@Repository
public interface QkjLiveCommentsDao extends PagingAndSortingRepository<QkjLiveComments, Long>, JpaSpecificationExecutor<QkjLiveComments> {
    @Query(value = "SELECT * from qkj_live_comments where live_id = ?1 and content != '' ORDER BY opr_time desc LIMIT 10",nativeQuery = true)
    List<QkjLiveComments> getComments(Long liveId);
}
