package com.qmth.teachcloud.mark.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.teachcloud.mark.dto.mark.manage.MarkArbitrateDto;
import com.qmth.teachcloud.mark.entity.MarkArbitrateHistory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 仲裁记录表 Mapper 接口
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
public interface MarkArbitrateHistoryMapper extends BaseMapper<MarkArbitrateHistory> {

    IPage<MarkArbitrateDto> pageArbitrate(@Param("page") Page<MarkArbitrateDto> page, @Param("examId") Long examId, @Param("paperNumber") String paperNumber, @Param("groupNumber") Integer groupNumber, @Param("status") String status, @Param("className") String className);

    MarkArbitrateHistory getArbitrateWaitingOne(@Param("examId") Long examId, @Param("paperNumber") String paperNumber, @Param("groupNumber") Integer groupNumber);

    List<MarkArbitrateHistory> getHistory(@Param("page") Page<MarkArbitrateHistory> page, @Param("examId") Long examId, @Param("paperNumber") String paperNumber, @Param("groupNumber") Integer groupNumber, @Param("status") String status, @Param("userId") Long userId);

    Integer waitArbitrateCount(@Param("examId") Long examId, @Param("paperNumber") String paperNumber, @Param("groupNumber") Integer groupNumber, @Param("status") String status, @Param("className") String className);
}
