weicd
2022-12-30 8190c46f505b0d2e6d9a2087bec0c4d7ba43c854
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/SysUserLevelOtherRepository.java
@@ -20,6 +20,8 @@
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
/**
* @website https://eladmin.vip
* @author 赵士淞
@@ -34,4 +36,11 @@
     */
    @Query(value = "SELECT * FROM sys_user_level_other WHERE user_id = ?1 ORDER BY start_date DESC, create_time DESC LIMIT 1", nativeQuery = true)
    SysUserLevelOther findLastByUserId(Long userId);
    /**
     * 根据用户查询记录
     * @param userId
     * @return
     */
    List<SysUserLevelOther> findByUserId(Long userId);
}