package com.jpsoft.shinestar.modules.business.dao;

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

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.jpsoft.shinestar.modules.business.entity.RequestForLeaveInfo;
import java.util.Map;
import com.jpsoft.shinestar.modules.common.dto.Sort;

@Repository
public interface RequestForLeaveInfoDAO {
	int insert(RequestForLeaveInfo entity);
	int update(RequestForLeaveInfo entity);
	int exist(String id);
	RequestForLeaveInfo get(String id);
	RequestForLeaveInfo findByPersonIdAndTimeQuantum(@Param("personId") Long personId,@Param("startTime") Date startTime,@Param("timeQuantum")String timeQuantum);
	int delete(String id);
	List<RequestForLeaveInfo> list();
	List<RequestForLeaveInfo> search(Map<String, Object> searchParams, List<Sort> sortList);
	List<RequestForLeaveInfo> mobileSearch(Map<String, Object> searchParams, List<Sort> sortList);
    List<RequestForLeaveInfo> findByPersonIdAndDate(Long personId, Date startDate, Date endDate);

    List<RequestForLeaveInfo> findByPersonAndStatus(@Param("personId")Long personId,@Param("status") String status);

    List<RequestForLeaveInfo> findByPersonIdAndAttendanceDate(Long personId, Date attendanceDate);
}