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

import cn.reghao.jutil.jdk.web.db.BaseMapper;
import cn.reghao.jutil.jdk.web.db.Page;
import cn.reghao.tnb.content.app.vod.model.po.PostAlbum;
import cn.reghao.tnb.content.app.vod.model.query.AlbumQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2024-10-31 14:00:18
 */
@Mapper
public interface PostAlbumMapper extends BaseMapper<PostAlbum> {
    void updateAlbumCover(@Param("albumId") long albumId, @Param("coverUrl") String coverUrl);
    void updateAlbumCount(@Param("albumId") long albumId, @Param("num") int num);

    int countByCriteria(AlbumQuery albumQuery);
    List<PostAlbum> findAlbumByPage(@Param("page") Page page, @Param("albumQuery") AlbumQuery albumQuery);
}
