| | |
| | | List<SysUserLevelOther> findByUserId(Long userId); |
| | | |
| | | /** |
| | | * 根据用户ID、指定年月查询 |
| | | * 根据用户ID、指定年月查询(旧) |
| | | * @param userId |
| | | * @param targetDate |
| | | * @return |
| | |
| | | SysUserLevelOther findByNewUserId(Long userId); |
| | | |
| | | /** |
| | | * 根据用户ID查询最早记录 |
| | | * @param userId / |
| | | * @return / |
| | | * 查询级别其他(新) |
| | | * @param userId |
| | | * @param targetDate |
| | | * @param nextYear |
| | | * @return |
| | | */ |
| | | @Query(value = "SELECT * FROM sys_user_level_other WHERE user_id = ?1 ORDER BY start_date ASC LIMIT 1", nativeQuery = true) |
| | | SysUserLevelOther findOldByUserId(Long userId); |
| | | @Query(value = "SELECT * FROM sys_user_level_other WHERE user_id = ?1 AND `year_month` >= ?2 AND `year_month` < ?3 ORDER BY `year_month` DESC LIMIT 1", nativeQuery = true) |
| | | SysUserLevelOther findByUserIdAndData(Long userId, String targetDate, String nextYear); |
| | | |
| | | } |