package com.YuyeTech.HeartRate.repository;

import com.YuyeTech.HeartRate.dataobject.RecentlyPlaying;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

/**
 * @author:slambb
 * @date:2020/1/15
 */
public interface RecentlyPlayingRepository extends JpaRepository<RecentlyPlaying,Integer> {

    List<RecentlyPlaying> findByUserId(String userId,Pageable pageable);

    //查询是否存在对应数据
    Optional<RecentlyPlaying> findByUserIdAndFObjectId(String userId, String fObjectId);
}
