package com.cirle.scientific.dao;

import com.cirle.scientific.po.QkjTqcourseComments;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface QkjTqcourseCommentsDao extends PagingAndSortingRepository<QkjTqcourseComments, Long>, JpaSpecificationExecutor<QkjTqcourseComments> {


    @Query(value = "select * from qkj_tqcourse_comments where tqcourse_id = ?1 order by opr_time desc",nativeQuery = true)
    List<QkjTqcourseComments> findCommentsByCourseId(Long id);
}
