package com.cm.common.article.dao.articlecontent;

import com.cm.common.article.pojo.dtos.articlecontent.ArticleContentDTO;
import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: IArticleContentDao
 * @Description: 文章内容
 * @Author: WenG
 * @Date: 2020-04-03 15:37
 * @Version: 1.0
 **/
@Repository
public interface IArticleContentDao {

    /**
     * 新增文章内容
     *
     * @param params
     * @throws SaveException
     */
    void saveArticleContent(Map<String, Object> params) throws SaveException;

    /**
     * 删除文章内容
     *
     * @param params
     * @throws RemoveException
     */
    void removeArticleContent(Map<String, Object> params) throws RemoveException;

    /**
     * 修改文章内容
     *
     * @param params
     * @throws UpdateException
     */
    void updateArticleContent(Map<String, Object> params) throws UpdateException;

    /**
     * 文章内容详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    ArticleContentDTO getArticleContent(Map<String, Object> params) throws SearchException;

    /**
     * 文章内容列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ArticleContentDTO> listArticleContent(Map<String, Object> params) throws SearchException;

    /**
     * 统计文章数量
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer countArticleCount(Map<String, Object> params) throws SearchException;

    /**
     * 文章内容列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ArticleContentDTO> listArticleContentAll(Map<String, Object> params) throws SearchException;

}
