package org.jeecg.modules.ctop.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface IMaterialReportOverViewService {

    //递归查询下级
    Set<String> recursiveQuerySubordinate(String userId);

    //查询用户参与的项目
    Set<JSONObject> queryProjectBy(Set<String> userIds, int mediaId);

    JSONArray queryProjectIdBy(Set<String> userIds, int mediaId);

    //查询总消耗、视频总数、爆款视频数、有效是视频数
    Map<String,Object> getTotalModule(int mediaId, String startDate, String endDate, JSONArray projects);
    //查询 视频上新 和 有效
    Map<String,Object> sumDataVideoNewEffective(int mediaId, String startDate, String endDate, JSONArray projects);
    //查询 爆款
    Map<String,Object> sumDataVideoHot(int mediaId, String startDate, String endDate, JSONArray projects);

    //查询消耗趋势图
    List<JSONObject> getTotalChat(int mediaId, String startDate, String endDate, JSONArray projects);

    //查询标签占比图
    JSONObject getTagProportion(int mediaId, String startDate, String endDate, int tagId);

    //查询Top素材排行榜
    List<JSONObject> getTopMaterialList(int mediaId, String startDate, String endDate, JSONArray projects, Integer channelType);

    //素材查看更多
    PageInfo<JSONObject> getTopMaterialList(int mediaId, String startDate, String endDate, JSONArray projects, String channelType, String md5, String target, String order, int pageNo, int pageSize);

    //导出
    void exportBytedanceExcel(JSONObject requestBody, HttpServletRequest request, HttpServletResponse response);

    void exportKuaishouExcel(JSONObject requestBody, HttpServletRequest request, HttpServletResponse response);

//    params.getInteger("mediaId"),
//            params.getString("startDate"),
//            params.getString("endDate"),
//            params.getJSONArray("projects"),
//            params.getString("roleName"));

    //查询设计人员排行榜
    List<JSONObject> getTopDesignList(Integer mediaId, String startDate, String endDate, JSONArray projects, String roleName);

    // 视频详情页
    JSONObject getMaterialDetailInfo(int mediaId, String md5);

    Map<String,Object> materialDetailAnalyse(int mediaId, String md5);

    List<JSONObject> getMaterialDetailChat(int mediaId, String md5);

}
