package com.cool.store.mapper;

import com.cool.store.dto.interview.LineInterviewPageDTO;
import com.cool.store.entity.LineInterviewDO;
import com.cool.store.request.LineInterviewPageRequest;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface LineInterviewMapper extends Mapper<LineInterviewDO> {

    /**
     * 获取面试信息
     * @param lineId
     * @param interviewType
     * @return
     */
    LineInterviewDO getInterviewInfo(@Param("lineId") Long lineId, @Param("interviewType") Integer interviewType);

    /**
     * getInterviewByLindIds
     * @param lineIds
     * @param interviewType
     * @return
     */
    List<LineInterviewDO> getInterviewByLindIds(@Param("lineIds") List<Long> lineIds, @Param("interviewType") Integer interviewType);

    /**
     * 获取面试分页
     * @param request
     * @return
     */
    Page<LineInterviewPageDTO> getInterviewerPage(LineInterviewPageRequest request);

    /**
     * 根据房间号获取面试信息
     * @param roomId
     * @return
     */
    LineInterviewDO getInterviewInfoByRoomId(@Param("roomId") String roomId);

    /**
     * 删除面试信息
     * @param interviewId
     * @return
     */
    Integer deleteInterviewInfo(@Param("interviewId")Long interviewId);

    /**
     * 获取面试信息
     * @param lineId
     * @return
     */
    List<LineInterviewDO> getInterviewByLineId(@Param("lineId") Long lineId);

    /**
     * 获取待审核面试信息
     * @return
     */
    List<LineInterviewDO> getWaitAuditInterview();

    /**
     * 批量更新面试状态
     * @param interviewIds
     * @param interviewStatus
     * @return
     */
    Integer batchUpdateInterviewStatus(@Param("interviewIds") List<Long> interviewIds, @Param("interviewStatus") Integer interviewStatus);

    /**
     * 获取面试提醒列表
     * @param startTime
     * @param endTime
     * @return
     */
    List<LineInterviewDO> getInterviewRemindList(@Param("startTime") String startTime, @Param("endTime") String endTime);
}