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.entity.UserMusicStar;
import com.yonge.cooleshow.biz.dal.wrapper.UserMusicStarWrapper;

import java.util.List;
import java.util.Map;

/**
 * 用户曲目作品点赞记录
 * 2023-10-30 14:59:53
 */
public interface UserMusicStarService extends IService<UserMusicStar>  {

	/**
     * 查询详情
     * @param id 详情ID
     * @return UserMusicStar
     */
	UserMusicStar detail(Long id);

    /**
     * 分页查询
     * @param page IPage<UserMusicStar>
     * @param query UserMusicStarWrapper.UserMusicStarQuery
     * @return IPage<UserMusicStar>
     */
    IPage<UserMusicStarWrapper.UserMusicStar> selectPage(IPage<UserMusicStar> page, UserMusicStarWrapper.UserMusicStarQuery query);

    /**
     * 添加
     * @param userMusicStar UserMusicStarWrapper.UserMusicStar
     * @return Boolean
     */
     Boolean add(UserMusicStarWrapper.UserMusicStar userMusicStar);

    /**
     * 更新
     * @param userMusicStar UserMusicStarWrapper.UserMusicStar
     * @return Boolean
     */
     Boolean update(UserMusicStarWrapper.UserMusicStar userMusicStar);

    /**
     * 点赞/取消点赞
     */
    void star(UserMusicStarWrapper.Star star);

    /**
     *
     * 查询点赞数
     *
     */
    Map<Long,Integer> getStarCountMapByUserMusicIds(List<Long> userMusicIds);

    /**
     * 是否点赞
     *
     */
    Map<Long,Boolean> getStarFlagMapByUserMusicIds(List<Long> userMusicIds, String clientType, String userId);
}
