package cn.com.ctop.kuaishou.modules.report.mapper;

import cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouReportAccountDaily;
import cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouReportAccountHourly;
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;

/**
 * 盯盘日数据
 *
 * @author: jeecg-boot
 * @date: 2021-03-04
 * @cersion: V1.0
 */
public interface EtlKuaishouReportAccountDailyMapper extends BaseMapper<EtlKuaishouReportAccountDaily> {

    void replaceBatch(@Param("list") List<EtlKuaishouReportAccountHourly> list);

    EtlKuaishouReportAccountHourly getOnedayAggregatebyDaily(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("accountId") Long accountId);

    List<JSONObject> getOnedayEtlReportList(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("accountId") Long accountId, @Param("value") String value, @Param("type") String type);

    JSONObject getMaxChargeAccountId(@Param("userId") String userId);

    String getNewlyUpdateTime();

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

    List<JSONObject> accountPageList(JSONObject request);

    int accountPageListTotal(JSONObject request);

    List<JSONObject> queryEveryDayCharge(JSONObject request);

    List<JSONObject> queryEveryDayCount(JSONObject request);

    List<JSONObject> projectPageList(JSONObject request);

    int projectPageListTotal(JSONObject request);

    List<JSONObject> leaderAccountPageList(JSONObject request);

    int leaderAccountPageListTotal(JSONObject request);

    List<EtlKuaishouReportAccountHourly> selectList(@Param("startDate") String startDate,@Param("endDate") String endDate);

    int operatingStaffDataListTotal(JSONObject request);

    List<JSONObject> operatingStaffDataList(JSONObject request);

    JSONObject getReportData(@Param("startDate") String startDate, @Param("endDate") String endDate,@Param("accountIds") JSONArray accountIds);
}
