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.po.ImagePost;
import cn.reghao.tnb.content.app.data.model.vo.ImageAlbumCard;
import cn.reghao.tnb.content.app.data.model.vo.ImageAlbumQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2023-08-19 02:33:11
 */
@Mapper
public interface ImagePostMapper extends BaseMapper<ImagePost> {
    void updateAlbumCount(@Param("albumId") long albumId, @Param("total") long total);

    int countByCriteria(ImageAlbumQuery imageAlbumQuery);
    List<ImagePost> findImageAlbumByPage(@Param("page") Page page, @Param("imageAlbumQuery") ImageAlbumQuery imageAlbumQuery);

    ImageAlbumCard findImageAlbumCardByAlbumId(long albumId);
}
