package jnpf.cultivate.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.model.cultivate.dto.offline.FtbCultivateOfflineTrainPeopleSigningInDTO;
import jnpf.model.cultivate.dto.storestatistics.dto.StoreOfflineTrainDto;
import jnpf.model.cultivate.po.offline.FtbCultivateOfflineTrain;
import jnpf.model.cultivate.vo.offline.FtbCultivateOfflineTrainPageVO;
import jnpf.model.cultivate.vo.offline.FtbCultivateOfflineTrainPeopleSigningInVO;
import jnpf.model.cultivate.vo.offline.FtbOfflineTrainingAppPageVO;
import jnpf.model.cultivate.vo.offline.OfflineCourseVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface FtbCultivateOfflineTrainMapper extends BaseMapper<FtbCultivateOfflineTrain> {
    /**
     * 线下培训课程信息
     */
    List<OfflineCourseVO> listOfflineCourseVO(@Param("offlineId") String offlineId, @Param("userId") String userId);

    /**
     * 线下培训课程信息根据线下培训id查询
     */
    List<OfflineCourseVO> listOfflineWebCourseVO(@Param("offlineId") String offlineId);

    /**
     * 线下培训分页
     */
    Page<FtbCultivateOfflineTrainPageVO> listPage(@Param("page") Page<FtbCultivateOfflineTrainPageVO> page, @Param("keywords") String keywords);

    /**
     * 线下培训app查询
     */
    Page<FtbOfflineTrainingAppPageVO> listOfflineTrainingApp(@Param("page") Page<FtbOfflineTrainingAppPageVO> page
            , @Param("type") Integer type
            , @Param("userId") String userId);

    /**
     * 线下培训附件删除
     */
    Integer deleteOfflineTrainFileById(@Param("id") String id);

    /**
     * 线下培训已绑定课程
     */
    List<String> queryCourseIdsByOfflineId(@Param("offlineId") String offlineId);

    /**
     * 线下培训签到人数分页查询
     */
    Page<FtbCultivateOfflineTrainPeopleSigningInVO> numberOfflineTraining(@Param("page") Page<FtbCultivateOfflineTrainPeopleSigningInVO> page
            , @Param("params") FtbCultivateOfflineTrainPeopleSigningInDTO data);

    List<StoreOfflineTrainDto> queryMyOfflineTrainList(@Param("userId") String userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<StoreOfflineTrainDto> queryMyOfflineTrainingHeader(@Param("userId") String userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 离职删除签到用户
     * @param userIds 用户列表
     */
    void deleteLeaveUser(@Param("userIds") List<String> userIds);
}