package com.utic.center.utic.stat.server.dao.mapper;

import com.utic.center.utic.stat.server.dto.HolidayDto;
import com.utic.center.utic.stat.server.dto.PatternDto;
import com.utic.center.utic.stat.server.dto.PatternJobDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UticStatPatternMapper {

    HolidayDto findHoliday(@Param("patternTime") String patternTime);
    int insertPatternHist(@Param("targetTable") String targetTable, @Param("fromTable") String fromTable, @Param("patternTime") String patternTime);
    int updatePattern(@Param("targetTable") String targetTable, @Param("statTable") String statTable, @Param("patternTime") String patternTime, @Param("minValue") String minValue, @Param("maxValue") String maxValue);

    int mergePatternWeekJob(@Param("targetTable") String targetTable, @Param("statTable") String statTable, @Param("columnName") String columnName, @Param("patternTime") String patternTime, @Param("weekType") String weekType);
    int mergePatternWeek(@Param("targetTable") String targetTable, @Param("jobTable") String jobTable, @Param("patternTime") String patternTime, @Param("minValue") String minValue, @Param("maxValue") String maxValue);

    PatternDto findPatternDay();
    PatternJobDto findPatternJobLog(@Param("patternType") String patternType, @Param("exeDay") String exeDay);
    int insertPatternJobLog(@Param("patternType") String patternType, @Param("exeDay") String exeDay);
    int updatePatternJobLog(@Param("patternType") String patternType, @Param("exeDay") String exeDay);
    int deletePatternWeekJob();
    int deletePattern15MinWeekJob();

    int updatePatternWeekJob(@Param("patternTime") String patternTime);
    int updatePattern15minWeekJob(@Param("patternTime") String patternTime);
}
