package com.zjty.tynotes.attendance.dao;

import com.zjty.tynotes.attendance.entity.ApprovalInformation;
import org.springframework.data.mongodb.repository.MongoRepository;

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

/**
 * @Author gwj
 * @create 2020/3/24 15:23
 */
public interface ApprovalInformationDao extends MongoRepository<ApprovalInformation,String> {
    List<ApprovalInformation> findAllByUserId(String userId);


    List<ApprovalInformation> findAllByApprovalUserIdOneOrApprovalUserIdTwo(String userId);

    List<ApprovalInformation> findAllByStatusIn(List<String> statusList);

    ApprovalInformation findAllByUserIdAndLeaveStartTimeBeforeAndLeaveEndTimeAfterAndApprovalTypeIn(String userId, Date startTime,Date endTime,List<String> type);

    ApprovalInformation findAllByUserIdAndLeaveStartTimeBeforeAndLeaveEndTimeBetweenAndApprovalTypeIn(String userId, Date startTime,Date startTime1,Date endTime,List<String> type);

    ApprovalInformation findAllByUserIdAndLeaveStartTimeBetweenAndLeaveEndTimeAfterAndApprovalTypeIn(String userId, Date startTime,Date endTime,Date endTime1,List<String> type);
}
