package com.yida.data.school.userLeave.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yida.data.common.core.entity.userLeave.EduLeaveRequestProcessConfig;
import com.yida.data.common.core.entity.userLeave.EduLeaveRequestUser;
import com.yida.data.school.dto.userLeave.LeaveRequestPageDTO;
import com.yida.data.school.dto.userLeave.ListUserRequestDTO;
import com.yida.data.school.vo.userLeave.EduLeaveRequestProcessConfigVO;
import com.yida.data.school.vo.userLeave.EduLeaveRequestUserVO;

import java.time.LocalDateTime;
import java.util.List;

import org.apache.ibatis.annotations.Param;

/**
 * Mapper
 *
 * @author wjm
 * @date 2022-12-01 10:51:19
 */
public interface EduLeaveRequestUserMapper extends BaseMapper<EduLeaveRequestUser> {

//    Page<EduLeaveRequestUser> findPage(@Param("page") Page<EduLeaveRequestUser> page,
//        @Param("requestUserName") String requestUserName, @Param("requestType") Integer requestType,
//        @Param("schoolId") Long schoolId, @Param("statusList") List<Integer> statusList,
//        @Param("studentIdList") List<Long> studentIdList, @Param("idList") List<Long> idList);

    Page<EduLeaveRequestUser> findPage(@Param("page") Page<EduLeaveRequestUser> page, @Param("dto") LeaveRequestPageDTO dto);

    List<EduLeaveRequestUser> findApprovalUserLeaveList(
            @Param("userId") Long userId, @Param("requestType") Integer requestType,
            @Param("schoolId") Long schoolId, @Param("statusList") List<Integer> statusList,
            @Param("currentUserStatusList") List<Integer> currentUserStatusList,
            @Param("createDate") LocalDateTime createDate);

    List<EduLeaveRequestUserVO> findUserRequestList(@Param("dto") ListUserRequestDTO dto);

    /**
     * 查询周统计
     *
     * @param studentIdList 学生id集合
     * @return long
     * @author ZYJ
     * @date 2023/12/16 14:15
     */
    long selectWeekNumber(@Param("studentIdList") List<Long> studentIdList);

    /**
     * 查询月统计
     *
     * @param studentIdList 学生id集合
     * @return long
     * @author ZYJ
     * @date 2023/12/16 14:35
     */
    long selectMonthNumber(@Param("studentIdList") List<Long> studentIdList);
}
