package cn.com.qmth.stmms.ms.core.repository;

import cn.com.qmth.stmms.ms.core.domain.InspectStudent;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by yuanpan on 2017/11/20.
 */
@Repository
public interface InspectStudentRepo extends CrudRepository<InspectStudent, Long> {


//    @Modifying
//    @Query(value = "delete from InspectStudent s where s.inspectRangeId = ?1 and s.examNumber in ?2")
//    void deleteByExamNumbers(Long inspectRangeId, List<String> examNumbers);

    void deleteByInspectRangeId(Long inspectRangeId);

    List<InspectStudent> findByInspectRangeId(Long inspectRangeId);
}
