package com.ssj.dao.sys.situation.dao;

import com.ssj.bean.sys.situation.domain.LearningSituationSuggest;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;


@Repository
public interface SituationSuggestDao extends JpaRepository<LearningSituationSuggest, String> {
    @Query(nativeQuery = true, value="select * from scon_learning_situation_suggest where course_name=?1 " +
            " and type=?2 and module=?3 and grade regexp ?4 and ?5 between min and max limit 1")
    LearningSituationSuggest findStandardAndSuggest(String courseName, int type, String module, String grade, int score);

	LearningSituationSuggest findById(String suggestId);
}
