package com.ozs.kpim.service.topic;

import com.ozs.kpim.dto.topic.TopicDTO;
import com.ozs.kpim.dto.topic.TopicTreeDTO;
import com.ozs.kpim.dto.topic.TopicZtreeDTO;
import com.ozs.kpim.service.common.IBaseService;
import com.ozs.kpim.util.R;

import java.util.List;

/* *
 * @Author jade
 * @Description 主题管理接口
 * @Date 2019/2/20
**/
public interface TopicManagerService extends IBaseService<TopicDTO> {

    /* *
     * @Author jade
     * @Description 查询主题列表（带分页）
     * @Date 2019/2/21
     * @Param [name, sort, order, page, pageSize]
     * @return R<java.util.List<TopicDTO>>
    **/
    R<List<TopicDTO>> listTopics(String name, String sort, String order, Integer page, Integer pageSize) throws Exception;
    
    /* *
     * @Author jade
     * @Description 查询主题的直接下级主题
     * @Date 2019/2/21
     * @Param [parentTopicCode]
     * @return R<java.util.List<TopicDTO>>
    **/
    R<List<TopicDTO>> listSubTopics(String parentTopicCode) throws Exception;

    /* *
     * @Author jade
     * @Description 主题树形结构
     * @Date 2019/2/21
     * @Param []
     * @return R<java.util.List<TopicTreeDTO>>
    **/
    R<List<TopicTreeDTO>> topicTree() throws Exception;

    /* *
     * @Author jade
     * @Description 主题树For Ztree
     * @Date 2019/3/6
     * @Param [name]
     * @return R<?>
    **/
    R<List<TopicZtreeDTO>> topicForZtree(String name);
    
    /* *
     * @Author jade
     * @Description 查询详情
     * @Date 2019/3/6
     * @Param [topicCode]
     * @return R<TopicDTO>
    **/
    R<TopicDTO> getByTopicCode(String topicCode);

    /* *
     * @Author jade
     * @Description 删除
     * @Date 2019/3/6
     * @Param [topicCode]
     * @return R<TopicDTO>
    **/
    R<TopicDTO> deleteByTopicCode(String topicCode);

}
