package com.ssj.dao.kmt.kmt.dao;

import com.ssj.bean.kmt.kmt.domain.KmtPrintManage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface KmtPrintManageDao  extends JpaRepository<KmtPrintManage, String> {

	@Query(nativeQuery = true, value = " SELECT * from kmt_print_manage t WHERE t.teacher_id=? AND t.state=1 ORDER BY t.create_time DESC ")
	public List<KmtPrintManage> findPrintManageByList(String teacherId);
	
	
	@Query(nativeQuery = true, value = " SELECT * from kmt_print_manage t where t.course_know_id=?1 LIMIT 1 ")
	public KmtPrintManage findPrintManageByCId(String courseKnowId);
	
}
