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.VideoCategoryPost;
import cn.reghao.tnb.content.app.vod.model.query.VideoQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2024-12-07 15:19:16
 */
@Mapper
public interface VideoCategoryPostMapper extends BaseMapper<VideoCategoryPost> {
    void updateVideoCategoryPost(VideoCategoryPost videoCategoryPost);
    void deleteByCategoryPid(int categoryPid);

    int countByCriteria(VideoQuery videoQuery);
    List<VideoCategoryPost> findVideoCategoryPostByPage(@Param("page") Page page, @Param("videoQuery") VideoQuery videoQuery);
    VideoCategoryPost findByCategoryIdAndUserId(@Param("categoryId") int categoryId, @Param("userId") long userId);
}
