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

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

import java.util.List;


@Repository
public interface KmtExampaperDao extends JpaRepository<KmtExampaper, String>{
	
	
	@Query(nativeQuery = true, value = " SELECT * from kmt_exampaper t where t.question_id=?1  ORDER BY t.create_time asc ")
	public List<KmtExampaper> findByQuIdList(String quId);

	@Query(nativeQuery = true, value = " DELETE FROM kmt_exampaper t WHERE t.question_id =?1 ")
	@Modifying
	public void deleteByQuestionId(String quId);

}
