package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.dto.search.StudentMusicSheetSearch;
import com.yonge.cooleshow.biz.dal.vo.MusicSheetPracticeRecordVo;
import com.yonge.cooleshow.biz.dal.dto.search.MusicSheetPracticeRecordSearch;
import com.yonge.cooleshow.biz.dal.entity.MusicSheetPracticeRecord;

/**
 * 曲目练习记录表 服务类
 * @author liweifan
 * @date 2022-04-02
 */
public interface MusicSheetPracticeRecordService extends IService<MusicSheetPracticeRecord>  {

	/**
     * 查询详情
     * @author liweifan
 	 * @date 2022-04-02
     */
	MusicSheetPracticeRecordVo detail(Long id);

    /**
     * 分页查询
     * @author liweifan
 	 * @date 2022-04-02
     */
    IPage<MusicSheetPracticeRecordVo> selectPage(IPage<MusicSheetPracticeRecordVo> page, MusicSheetPracticeRecordSearch query);

	/**
	 * 添加曲目练习记录
	 *
	 * @param musicSheetId 曲目id
	 * @param userId 用户id
	 */
	void addRecord(Long musicSheetId, Long userId);

	/**
	 * 查询学生最近练习的曲目id
	 *
	 * @param query 查询条件
	 * @param page 当前页
	 * @param size 展示数据
	 * @return 曲目id 集合
	 */
	IPage<Long> selectPracticeMusic(StudentMusicSheetSearch query, long page, long size);
}