package com.zhongzheng.modules.exam.mapper;

import com.zhongzheng.modules.exam.bo.ExamApplyQueryBo;
import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
import com.zhongzheng.modules.exam.domain.ExamApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhongzheng.modules.exam.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 考试安排Mapper接口
 *
 * @author ruoyi
 * @date 2021-12-07
 */
public interface ExamApplyMapper extends BaseMapper<ExamApply> {

    List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo);

    Long countGoods(Long applyId);

    List<ExamNumberGoodsVo> examNumberGoodsVos(Long applyId);

    List<ExamApplySiteVo> addressExam(@Param("applyId") Long applyId,@Param("status") Long i);

    List<ExamApplySiteTimeVo> addressTimeExam(Long id);

    ExamApplyVo selectByApply(Long applyId);

    List<ExamApplyVo> queryExam(ExamApplyQueryBo bo);

    List<Long> countGoodsHold(Long applyId);

    Integer countGradePeriod(ExamApplyQueryBo bo);

    Integer countSubscribe(ExamApplyQueryBo bo);

    Integer countHaveSubscribe(ExamApplyQueryBo bo);

    ExamUserApplyVo selectExamUserApplyVo(ExamApplyQueryBo bo);

    Integer countHaveSubscribeNext(ExamApplyQueryBo bo);

    Integer residueSubscribeNext(ExamApplyQueryBo bo);

    Integer beforeSubscribeNext(ExamApplyQueryBo bo);

    List<ExamUserApplySiteVo> subscribeApplySite(ExamApplyQueryBo bo);

    List<ExamUserApplySiteTimeVo> subscribeApplySiteTime(Long id);

    Long registration(@Param("applyId")Long applyId,@Param("examTime") Long examTime,@Param("siteAddress") String siteAddress,@Param("startTime") String startTime,@Param("endTime") String endTime);

    Long userStatus(@Param("userId") Long userId,@Param("examTime") Long examTime,@Param("startTime") String startTime,@Param("endTime") String endTime);

    List<ExamUserApplySiteVo> subscribeApplySiteTrain(ExamApplyQueryBo bo);

    Long registrationTrain(@Param("applyId")Long applyId,@Param("examTime") Long examTime,@Param("siteAddress") String siteAddress,@Param("startTime") String startTime,@Param("endTime") String endTime);

    Long userStatusTrain(@Param("userId") Long userId,@Param("examTime") Long examTime,@Param("startTime") String startTime,@Param("endTime") String endTime);

}
