package com.fjhx.service.video;

import com.alibaba.fastjson.JSONObject;
import com.fjhx.base.BaseService;
import com.fjhx.entity.video.VideoClassify;
import com.fjhx.params.video.VideoClassifyVo;

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

/**
 * <p>
 * 分类 服务类
 * </p>
 *
 * @author ${author}
 * @since 2022-08-08
 */
public interface VideoClassifyService extends BaseService<VideoClassify> {

    List<JSONObject> getTree(Map<String, String> condition);

    void add(VideoClassifyVo videoClassifyVo);

    void edit(VideoClassifyVo videoClassifyVo);

    void delete(VideoClassifyVo videoClassifyVo);

    /**
     * 获取 分类id 和 分类子级id 数组
     *
     * @param classifyId 分类id
     * @return 分类id 和 分类子级id 数组
     */
    List<Long> getChildrenIdList(Long classifyId);

    /**
     * 改变分类视频数量
     *
     * @param oldClassifyId 原分类id
     * @param oldVideoNum   原视频数量
     * @param newClassifyId 现分类id
     * @param newVideoNum   现视频数量
     */
    void updateVideoNum(Long oldClassifyId, Integer oldVideoNum, Long newClassifyId, Integer newVideoNum);

}
