package com.cm.common.article.service.articlecategory;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.pojo.ListPage;
import com.cm.common.result.SuccessResult;
import com.cm.common.result.SuccessResultData;
import com.cm.common.result.SuccessResultList;
import com.cm.common.article.pojo.dtos.articlecategory.ArticleCategoryDTO;
import com.cm.common.article.pojo.vos.articlecategory.ArticleCategoryVO;

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

/**
 * @ClassName: IArticleCategoryService
 * @Description: 文章类别
 * @Author: WenG
 * @Date: 2020-04-03 15:20
 * @Version: 1.0
 **/
public interface IArticleCategoryService {

    /**
     * 新增文章类别
     *
     * @param articleCategoryVO
     * @return
     * @throws Exception
     */
    SuccessResult saveArticleCategory(ArticleCategoryVO articleCategoryVO) throws Exception;

    /**
     * 新增文章类别(APP)
     *
     * @param token
     * @param articleCategoryVO
     * @return
     * @throws Exception
     */
    SuccessResult saveArticleCategoryByToken(String token, ArticleCategoryVO articleCategoryVO) throws Exception;

    /**
     * 删除文章类别
     *
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removeArticleCategory(String ids) throws RemoveException;

    /**
     * 删除文章类别(APP)
     *
     * @param token
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removeArticleCategoryByToken(String token, String ids) throws RemoveException;

    /**
     * 修改文章类别
     *
     * @param articleCategoryId
     * @param articleCategoryVO
     * @return
     * @throws Exception
     */
    SuccessResult updateArticleCategory(String articleCategoryId, ArticleCategoryVO articleCategoryVO) throws Exception;

    /**
     * 修改文章类别(APP)
     *
     * @param token
     * @param articleCategoryId
     * @param articleCategoryVO
     * @return
     * @throws Exception
     */
    SuccessResult updateArticleCategoryByToken(String token, String articleCategoryId, ArticleCategoryVO articleCategoryVO) throws Exception;

    /**
     * 文章类别详情(通过ID)
     *
     * @param articleCategoryId
     * @return
     * @throws SearchException
     */
    ArticleCategoryDTO getArticleCategoryById(String articleCategoryId) throws SearchException;

    /**
     * 文章类别列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ArticleCategoryDTO> listArticleCategory(Map<String, Object> params) throws SearchException;

    /**
     * 文章类别分页列表
     *
     * @param page
     * @return
     * @throws SearchException
     */
    SuccessResultList<List<ArticleCategoryDTO>> listPageArticleCategory(ListPage page) throws SearchException;

}
