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

import cn.reghao.jutil.jdk.web.db.BaseMapper;
import cn.reghao.jutil.jdk.web.db.Page;
import cn.reghao.tnb.content.app.exam.model.po.PaperResult;
import cn.reghao.tnb.content.app.exam.model.query.ExamQuery;
import cn.reghao.tnb.content.app.exam.model.vo.ExamResults;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2024-08-28 15:20:45
 */
@Mapper
public interface PaperResultMapper extends BaseMapper<PaperResult> {
    void updateSetResultMarked(@Param("resultId") int resultId, @Param("subjectiveScore") int subjectiveScore);

    List<PaperResult> findByPaperId(int paperId);
    int countByCriteria(ExamQuery examQuery);
    List<ExamResults> findExamResultsByPage(Page page, @Param("examQuery") ExamQuery examQuery);
    List<PaperResult> findPaperResultByPage(Page page, @Param("examQuery") ExamQuery examQuery);
}
