package com.cirle.scientific.dao;

import com.cirle.scientific.po.QkjTqcourseCommentsApp;
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 QkjTqcourseCommentsAppDao extends PagingAndSortingRepository<QkjTqcourseCommentsApp, Long>,
        JpaSpecificationExecutor<QkjTqcourseCommentsApp> {


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