| | |
| | | package me.zhengjie.modules.system.repository; |
| | | |
| | | import me.zhengjie.modules.system.domain.SysUserLevelInsurance; |
| | | import me.zhengjie.modules.system.domain.SysUserLevelWage; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
| | | import org.springframework.data.jpa.repository.Query; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @website https://eladmin.vip |
| | |
| | | */ |
| | | @Query(value = "SELECT * FROM sys_user_level_insurance WHERE user_id = ?1 ORDER BY start_date DESC, create_time DESC LIMIT 1", nativeQuery = true) |
| | | SysUserLevelInsurance findLastByUserId(Long userId); |
| | | |
| | | /** |
| | | * 根据用户ID查询 |
| | | * @param userId / |
| | | * @return / |
| | | */ |
| | | @Query(value = "SELECT * FROM sys_user_level_insurance WHERE user_id = ?1", nativeQuery = true) |
| | | List<SysUserLevelInsurance> findByUserId(Long userId); |
| | | } |