package com.aircraft.modules.article.mapper;

import com.aircraft.modules.article.domain.CpArticle;
import com.aircraft.modules.article.domain.dto.CpArticleDTO;
import com.aircraft.modules.article.domain.dto.CpArticleVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 文章表 Mapper 接口
 * </p>
 *
 * @author cli
 * @since 2025-07-10
 */
@Mapper
public interface CpArticleMapper extends BaseMapper<CpArticle> {

    void updateDelFlagById(Long id, Integer delFlag);

    IPage<CpArticleVo> selectVoPage(Page<CpArticleVo> page, CpArticleDTO dto);

    CpArticleVo selectVoById(Integer id);

    void updateViewCountById(Integer id);

    void updateById(CpArticleDTO entity);
}
