weicd
2023-01-30 7eb7874266af0886a6441410ae42b50522d64786
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);
}