yaozc
2023-01-31 aa102c7ba6977ff40f3e02eba32a00a168fb3564
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/repository/AttendanceRepository.java
@@ -37,4 +37,8 @@
    /** 根据员工姓名模糊查询 */
    @Query(value = "SELECT * from attendance WHERE  " , nativeQuery = true)
    List<AttendanceDto> findByUserNameLike(String userName);
    /** 根据时间范围查询考勤记录 **/
    @Query(value = "SELECT * from attendance where user_id = ?1 and attendance_date <= ?3 and attendance_date >= ?2", nativeQuery = true)
    List<Attendance> findAllByUserAndDate(Long userId, String startDate, String endDate);
}