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

import com.ssj.bean.kmt.kmt.domain.KmtExerciseQuestionRollback;
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 KmtExerciseQuestionRollbackDao extends JpaRepository<KmtExerciseQuestionRollback, String> {


    @Query(nativeQuery = true,value = "select * from kmt_exercise_question_rollback\n" +
            "where to_user_id is null and to_user_type in (1, 2, 3, 4)\n" +
            "order by create_time desc ")
    List<KmtExerciseQuestionRollback> findAllTouserId();
}
