package com.mindskip.xzs.repository;
|
|
import com.mindskip.xzs.domain.ExamPaper;
|
import com.mindskip.xzs.domain.exam.ExamClassShortInfo;
|
import com.mindskip.xzs.domain.other.KeyValue;
|
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM;
|
import com.mindskip.xzs.viewmodel.student.dashboard.PaperFilter;
|
import com.mindskip.xzs.viewmodel.student.dashboard.PaperInfo;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
|
import java.util.Date;
|
import java.util.List;
|
|
/**
|
* @version 2.2.0
|
* @description: 试卷
|
* Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
|
* @date 2021 /9/7 9:45
|
*/
|
@Mapper
|
public interface ExamPaperMapper extends BaseMapper<ExamPaper> {
|
int deleteByPrimaryKey(Integer id);
|
|
int insert(ExamPaper record);
|
|
int insertSelective(ExamPaper record);
|
|
ExamPaper selectByPrimaryKey(Integer id);
|
|
int updateByPrimaryKeySelective(ExamPaper record);
|
|
int updateByPrimaryKey(ExamPaper record);
|
|
/**
|
* 试卷分页
|
*
|
* @param requestVM the request vm
|
* @return the list
|
*/
|
List<ExamPaper> page(ExamPaperPageRequestVM requestVM);
|
|
/**
|
* 管理端试卷分页
|
*
|
* @param requestVM the request vm
|
* @return the list
|
*/
|
List<ExamPaper> adminPage(ExamPaperPageRequestVM requestVM);
|
|
/**
|
* 任务试卷分页
|
*
|
* @param requestVM the request vm
|
* @return the list
|
*/
|
List<ExamPaper> taskExamPage(ExamPaperPageRequestVM requestVM);
|
|
/**
|
* 学生端试卷分页
|
*
|
* @param requestVM the request vm
|
* @return the list
|
*/
|
List<ExamPaper> studentPage(ExamPaperPageVM requestVM);
|
|
/**
|
* 学生班级试卷
|
*
|
* @param requestVM the request vm
|
* @return the list
|
*/
|
List<ExamPaper> studentClassesPage(ExamPaperPageVM requestVM);
|
|
/**
|
* 获取前五个试卷
|
*
|
* @param paperFilter the paper filter
|
* @return the list
|
*/
|
List<PaperInfo> indexPaper(PaperFilter paperFilter);
|
|
/**
|
* 获取班级试卷信息
|
*
|
* @param cIds the c ids
|
* @return the list
|
*/
|
List<ExamClassShortInfo> classesPaper(@Param("cIds") List<Integer> cIds);
|
|
/**
|
* 获取所有试卷数量
|
*
|
* @return the integer
|
*/
|
Integer selectAllCount();
|
|
/**
|
* 获取时间段内的试卷数量
|
*
|
* @param startTime the start time
|
* @param endTime the end time
|
* @return the list
|
*/
|
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
|
/**
|
* 更新任务试卷
|
*
|
* @param taskId the task id
|
* @param paperIds the paper ids
|
* @return the int
|
*/
|
int updateTaskPaper(@Param("taskId") Integer taskId, @Param("paperIds") List<Integer> paperIds);
|
|
/**
|
* 清理任务试卷
|
*
|
* @param paperIds the paper ids
|
* @return the int
|
*/
|
int clearTaskPaper(@Param("paperIds") List<Integer> paperIds);
|
|
/**
|
* 获取智能训练试卷数量
|
*
|
* @param userId the user id
|
* @return the random paper count
|
*/
|
Integer getRandomPaperCount(@Param("createUserId") Integer userId);
|
}
|