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

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

import java.util.List;

/**
 * @author reghao
 * @date 2023-10-11 14:23:45
 */
@Mapper
public interface FavlistContentMapper extends BaseMapper<FavlistContent> {
    void deleteByContentId(@Param("contentId") String contentId, @Param("favlistId") long favlistId);

    FavlistContent findByContentId(String contentId, int contentType, long userId);

    int countByFavlistId(long favlistId);
    List<FavlistContent> findByFavlistIdByPage(Page page, long favlistId);
}
