package com.hai.service;



import com.hai.entity.CmsCategory;
import com.hai.model.CmsCategoryTreeModel;

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

/**
 * @ClassName: CmsCategoryService
 * @Description: CMS内容分类
 * @author: gongjia
 * @date: 2019/10/28 9:46
 * @Copyright: 2019 www.shinwoten.com Inc. All rights reserved.
 */
public interface CmsCategoryService {

    /**
     *
     * @Title: addCategory
     * @Description: 增加 内容分类
     * @author: gongjia
     * @param: [cmsCategory]
     * @return: int
     * @throws
     */
    int addCategory(CmsCategory cmsCategory, List<Integer> roleList) throws Exception;

    /**
     *
     * @Title: updateCategory
     * @Description: 修改 内容分类
     * @author: gongjia
     * @param: [cmsCategory]
     * @return: int
     * @throws
     */
    int updateCategory(CmsCategory cmsCategory, List<Integer> roleList) throws Exception;

    /**
     *
     * @Title: delCategory
     * @Description: 删除 内容分类
     * @author: gongjia
     * @param: [id]
     * @return: int
     * @throws
     */
    int delCategory(Long id) throws Exception;

    /**
     *
     * @Title: getCategoryById
     * @Description: 根据id查询 内容分类
     * @author: gongjia
     * @param: [id]
     * @return: com.ncsmesc.entity.CmsCategory
     * @throws
     */
    CmsCategory getCategoryById(Long id) throws Exception;

    /**
     *
     * @Title: getCategoryTree
     * @Description: 获取 内容分类树
     * @author: gongjia
     * @param: [paramsMap]
     * @return: java.util.List<com.ncsmesc.model.CmsCategoryTreeModel>
     * @throws
     */
    List<CmsCategoryTreeModel> getCategoryTree(Map<String, Object> paramsMap) throws Exception;

    /**
     *
     * @Title: getCategoryTree
     * @Description: 获取 拥有的内容分类树
     * @author: gongjia
     * @param: [paramsMap]
     * @return: java.util.List<com.ncsmesc.model.CmsCategoryTreeModel>
     * @throws
     */
    List<CmsCategoryTreeModel> getOwnCategoryTree(Map<String, Object> paramsMap) throws Exception;

    /**
     *
     * @Title: getCategoryList
     * @Description: 查询 分类列表
     * @author: gongjia
     * @param: [paramsMap]
     * @return: java.util.List<com.ncsmesc.entity.CmsCategory>
     * @throws
     */
    List<CmsCategory> getCategoryList(Map<String, Object> paramsMap) throws Exception;

    /**
     *
     * @Title: getOwnCategoryList
     * @Description: 查询角色拥有的分类
     * @author: gongjia
     * @param: [paramsMap]
     * @return: java.util.List<com.ncsmesc.entity.CmsCategory>
     * @throws
     */
    List<CmsCategory> getOwnCategoryList(Map<String, Object> paramsMap) throws Exception;

    /**
     *
     * @Title: getCategoryChildren
     * @Description: 根据id查询 子级分类（仅查询下一级）
     * @author: gongjia
     * @param: [id]
     * @return: java.util.List<com.ncsmesc.entity.CmsCategory>
     * @throws
     */
    List<CmsCategory> getCategoryChildren(Long id) throws Exception;

    /**
     *
     * @Title: getRolesOfCategory
     * @Description: 根据id查询 分类角色列表
     * @author: gongjia
     * @param: [id]
     * @return: java.util.List<java.lang.Integer>
     * @throws
     */
    List<Integer> getRolesOfCategory(Long id) throws Exception;

}
