| | |
| | | @Query(value = "SELECT * from new_user_level_wage WHERE user_id = ?1 AND `year_month` = ?2",nativeQuery = true) |
| | | UserLevelWage findByUserAndDate(Long userId, String yearMonth); |
| | | |
| | | /** 新增、修改时验证日期是否重复 **/ |
| | | @Query(value = "SELECT * from new_user_level_wage WHERE user_id = ?1 AND `year_month` <= ?2 ORDER BY `year_month` DESC LIMIT 1",nativeQuery = true) |
| | | UserLevelWage findByUserCurrentLevelWage(Long userId, String yearMonth); |
| | | |
| | | /** 查询没转正且年月最大的数据 **/ |
| | | @Query(value = "SELECT * from new_user_level_wage WHERE user_id = ?1 AND `year_month` < ?2 ORDER BY `year_month` DESC LIMIT 1",nativeQuery = true) |
| | | UserLevelWage findByUserIdAndNoWorker(Long userId, String yearMonth); |