| | |
| | | |
| | | Optional<UserInsurance> findByUserIdAndYearMonth(Long userId, String monthYear); |
| | | |
| | | @Query(value = "SELECT * from new_user_insurance WHERE user_id = ?1 AND `year_month` >= ?2 ORDER BY `year_month` ASC LIMIT 1",nativeQuery = true) |
| | | @Query(value = "SELECT * from new_user_insurance WHERE user_id = ?1 AND `year_month` >= ?2 ORDER BY `year_month` DESC LIMIT 1",nativeQuery = true)
|
| | | UserInsurance findbyUserIdAndDate(Long userId, String yearMonth); |
| | | |
| | | @Query(value = "SELECT * FROM `new_user_insurance` WHERE user_id = ?1 AND `year_month` != ?2",nativeQuery = true) |
| | | UserInsurance findbyUserIdAndNotEqualTo(Long userId, String yearMonth); |
| | | |
| | | @Query(value = "SELECT * FROM `new_user_insurance` WHERE user_id = ?1 AND `year_month` < ?2 ORDER BY `year_month` DESC LIMIT 1",nativeQuery = true)
|
| | | UserInsurance findbyUserIdAndYearMonthLessThan(Long userId, String yearMonth);
|
| | |
|
| | | @Query(value = "SELECT * FROM `new_user_insurance` WHERE user_id = ?1 AND `year_month` >= ?2",nativeQuery = true)
|
| | | UserInsurance findbyUserIdAnYearMonthGreaterThanEqual(Long userId, String yearMonth);
|
| | |
|
| | | @Query(value = "SELECT * FROM `new_user_insurance` WHERE user_id in (SELECT user_id FROM sys_user WHERE company_id = ?1 AND enabled is true)",nativeQuery = true) |
| | | List<UserInsurance> findbyCompanyId(Long companyId); |
| | | |
| | | List<UserInsurance> findByUserId(Long userId);
|
| | |
|
| | | // /** |
| | | // * 查询第二条 |
| | | // * @param companyId |