yaozc
2024-03-25 9b2c90fa0abe194de3a32df97702fd009da88570
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/repository/UserLevelWageRepository.java
@@ -47,6 +47,10 @@
   @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);