package com.shining.cloud.mapper.report;

import com.shining.cloud.pojo.information.EventInfo;
import com.shining.cloud.pojo.report.ReportData;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface ShiningReportMapper extends Mapper<ReportData> {
    List<ReportData> steadyReportList(@Param("userId") String userId, @Param("lineList") List<Integer> lineList, @Param("sysType") Integer system_type, @Param("reportType") Integer report_type, @Param("list") List<Integer> list
            , @Param("start") Date start, @Param("end") Date end);

    List<ReportData> transientReportList(@Param("userId") String userId, @Param("lineList") List<Integer> lineList, @Param("sysType") Integer system_type, @Param("reportType") Integer report_type, @Param("deptsIndex") String deptsIndex
            , @Param("start") Date start, @Param("end") Date end);

    ReportData reportIsExist(@Param("lineIndex") Long lineIndex, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("reportType") Integer reportType
            , @Param("deptsIndex") String deptsIndex);

    void insertReportData(@Param("uuid") String uuid, @Param("name") String name, @Param("lineIndex") Long lineIndex, @Param("userId") String userId,
                          @Param("date") Date date, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("sysType") Integer sysType, @Param("reportType") Integer reportType,
                          @Param("path") String path, @Param("state") int state, @Param("errorCount") int errorCount, @Param("deptsIndex") String deptsIndex);

    void updateReportData(@Param("reportIndex") String reportIndex, @Param("date") Date date, @Param("errorCount") int errorCount, @Param("state") Integer state, @Param("path") String path);

    EventInfo getDownLoadPath(@Param("userId") String userId, @Param("eventDetailIndex") String eventDetailIndex);

    List<String> getUserGuid();
}
