package com.zjty.tynotes.pas.dao;

import com.zjty.tynotes.pas.entity.Day;
import org.springframework.data.mongodb.repository.MongoRepository;

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

/**
 * @Author gwj
 * @create 2020/3/1 11:14
 */
public interface DayDao extends MongoRepository<Day,String> {
    Day findByStatusAndDateEquals(String status, Date startDate);
    List<Day> findAllByStatusAndDateBetween(String status,Date startDate, Date lastDate);
//    List<Day> findAllByStatusAndDateGreaterThanEqual(String status, Date startDate);
//    List<Day> findAllByStatusAndDateLessThanEqual(String status, Date lastDate);

//    List<Day> findAllByStatusAndDateWithin(String status,Date startDate, Date lastDate);

    List<Day> findAllByDateBetween(Date startDate, Date lastDate);
    Day findByDateEquals(Date date);

    Day findByDate(Date date);
}
