package cn.com.ctop.report.mapper;

import cn.com.ctop.report.entity.KuaishouAccountReportDailyDw;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

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

public interface KuaishouAccountReportDailyDwMapper extends BaseMapper<KuaishouAccountReportDailyDw> {
    List<JSONObject> getReportByParams(@Param(value = "filedAll") String filedAll, @Param(value = "endDate") Long endDate, @Param(value = "startDate") Long startDate, @Param(value = "accountIds") JSONArray accounts, @Param(value = "target") String target, @Param(value = "order") String order, @Param(value = "hasGroupBy") int hasGroupBy, @Param(value = "groupBy") String groupBy);

    JSONObject getTotalCharge(Map<String, Object> paramsMap);

    Long getYesterdayUploadNewMaterialCount(Map<String, Object> paramsMap);

    List<JSONObject> getHourcharge(@Param("projectId") Long projectId, @Param("startTime") Integer startTime);

    List<JSONObject> getDatacharge(@Param("projectId") Long projectId, @Param("startTime") Integer startTime, @Param("endTime") Integer endTime);

    Long getProjectToDayReportTotal(@Param("projectId") Long projectId, @Param("startTime") Integer startTime, @Param("hour") Integer hour);

    List<JSONObject> getProjectToDayReport(@Param("projectId") Long projectId, @Param("startTime") Integer startTime, @Param("hour") Integer hour);

    Long getProjectMoreDaysReportTotal(@Param("projectId") Long projectId, @Param("startTime") Integer startTime, @Param("endTime") Integer endTime, @Param("hour") Integer hour);

    List<JSONObject> getProjectMoreDaysReport(@Param("projectId") Long projectId, @Param("startTime") Integer startTime, @Param("endTime") Integer endTime, @Param("hour") Integer hour);

}
