package cn.reghao.tnb.content.app.data.db.mapper;

import cn.reghao.jutil.jdk.db.BaseMapper;
import cn.reghao.jutil.jdk.db.Page;
import cn.reghao.tnb.content.app.data.model.dto.AudioScopeUpdate;
import cn.reghao.tnb.content.app.data.model.po.AudioPost;
import cn.reghao.tnb.content.app.data.model.vo.UserAudioCard;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2023-01-29 10:07:19
 */
@Mapper
public interface AudioPostMapper extends BaseMapper<AudioPost> {
    void updateAudioScope(AudioScopeUpdate audioScopeUpdate);

    int countByUserId(@Param("userId") long userId);
    List<UserAudioCard> findAudioCardByUserIdAndByPage(Page page, long userId);

    AudioPost findByAudioId(String audioId);
    UserAudioCard findAudioInfo(@Param("audioId") String audioId);
}
