赵士淞
2023-01-30 27fc9e778fae0e0abfbac2d7e4e011251be55ad5
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);
}