package com.rongwei.trainingcommon.sys.dao;

import com.rongwei.rwcommon.base.BaseDao;
import com.rongwei.training.domain.SubjectDo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 考题定义表
 * 2
 *
 * @author sola
 * @email zhangchi@irongwei.com
 * @date 2020-09-22 14:28:46
 */
public interface SubjectDao extends BaseDao<SubjectDo> {

    @Select("SELECT * FROM training_subject WHERE DELETED = '0' AND SUBJECTCOURSEIDS LIKE '%${subjectCourseIds}%' AND SUBJECTTYPE = #{subjectType} ")
    List<SubjectDo> getSubjectByCourseId(@Param("subjectCourseIds") String subjectCourseIds, @Param("subjectType") String subjectType);

    List<SubjectDo> selectInfoByCourseIds(@Param("courseIds") List<String> courseIds);
}
