package cn.reghao.tnb.content.app.exam.db.mapper;

import cn.reghao.jutil.jdk.db.BaseMapper;
import cn.reghao.jutil.jdk.db.Page;
import cn.reghao.tnb.common.db.GroupCount;
import cn.reghao.tnb.content.app.exam.model.po.Question;
import cn.reghao.tnb.content.app.exam.model.query.QuestionQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author reghao
 * @date 2024-08-24 23:28:40
 */
@Mapper
public interface QuestionMapper extends BaseMapper<Question> {
    void deleteById(int id);
    List<Question> findBySubjectId(int subjectId);
    List<Question> findByPid(int pid);
    List<Question> findByQuestionIds(List<Integer> list);
    List<GroupCount> findGroupBySubjectId(int subjectId);

    int countByCriteria(QuestionQuery questionQuery);
    List<Question> findQuestionByPage(Page page, QuestionQuery questionQuery);
}
