package com.ruoyi.system.mapper;

import com.ruoyi.common.core.domain.entity.CategoryInfo;
import com.ruoyi.common.core.domain.entity.MusicInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 音乐信息Mapper接口
 * 
 * @author ruoyi
 * @date 2025-07-15
 */
public interface MusicInfoMapper 
{
    /**
     * 查询音乐信息
     * 
     * @param id 音乐信息主键
     * @return 音乐信息
     */
    public MusicInfo selectMusicInfoById(String id);

    /**
     * 查询音乐信息列表
     * 
     * @param musicInfo 音乐信息
     * @return 音乐信息集合
     */
    public List<MusicInfo> selectMusicInfoList(MusicInfo musicInfo);

    /**
     * 新增音乐信息
     * 
     * @param musicInfo 音乐信息
     * @return 结果
     */
    public int insertMusicInfo(MusicInfo musicInfo);

    /**
     * 修改音乐信息
     * 
     * @param musicInfo 音乐信息
     * @return 结果
     */
    public int updateMusicInfo(MusicInfo musicInfo);

    /**
     * 删除音乐信息
     * 
     * @param id 音乐信息主键
     * @return 结果
     */
    public int deleteMusicInfoById(String id);

    /**
     * 批量删除音乐信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMusicInfoByIds(String[] ids);

    MusicInfo selectByCate(CategoryInfo categoryInfo);

    List<MusicInfo> selectMusicInfoByCid(String categoryId);

    List<MusicInfo> selectMusicInfoByIds(List<Long> musicIdList);

    List<MusicInfo> selectMusicInfoByIdsLimit(List<Long> musicIdList);

    List<MusicInfo> selectRecommendMusic();

    List<MusicInfo> selectMusicByCollectId(String collectId);

    int insertLikeMusic(@Param("userId") Long userId,@Param("musicId") String musicId);

    List<MusicInfo> selectLikeMusicByUser(Long userId);

    int delLikeMusic(@Param("userId") Long userId,@Param("musicId") String musicId);

    int insertHistory(@Param("userId") Long userId,@Param("musicId") String musicId);

    List<MusicInfo> selectHistoryMusicByUser(Long userId);

    MusicInfo selectByMusicId(String musicId);

    List<MusicInfo> selectRecommendMusicByReId(String reId);

    MusicInfo selectByPath(String path);

    List<MusicInfo> selectMusicInfoByReId(String reId);
}
