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

import com.utic.center.common.annotation.SqlOperation;
import com.utic.center.utic.stat.server.dao.mapper.UticStat05MinStatMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

@Repository
@RequiredArgsConstructor
public class UticStat05MinStatRepository {

    private final UticStat05MinStatMapper mapper;

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "CENTER_LOG", param = "regDate", param2 = "STAT_LOCAL")
    public int insertCenterLog(String regDate) {
        return this.mapper.insertCenterLog(regDate);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "STAT_TRAFFIC_LOG", param = "TRAFFIC_CENTER_", param2 = "regDate")
    public int insertStatTrafficLog(String yyMm, String regDate) {
        return this.mapper.insertStatTrafficLog(yyMm, regDate);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "FILTER_LOG", param = "regDate", param2 = "STAT_LOCAL, LINK_FILTER")
    public int insertFilterLog(String regDate, String codeValue0, String codeValue1, String codeValue2, String codeValue3, String codeValue4) {
        return this.mapper.insertFilterLog(regDate, codeValue0, codeValue1, codeValue2, codeValue3, codeValue4);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "LINK_FILTER_LOG_", param = "yyMm", param2 = "regDate")
    public int insertLinkFilterLog(String yyMm, String codeValue4) {
        return this.mapper.insertLinkFilterLog(yyMm, codeValue4);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "STAT_5MIN_CENTER_", param = "yyMm", param2 = "regDate")
    public int insertStat5MinCenter(String yyMm, String regDate, String codeValue4) {
        return this.mapper.insertStat5MinCenter(yyMm, regDate, codeValue4);
    }

    // FROM STAT_RM_CENTER_yyMm
    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "STAT_FILTER_LOG", param = "yyMm", param2 = "regDate")
    public int insertStatFilterLog(String yyMm, String regDate) {
        return this.mapper.insertStatFilterLog(yyMm, regDate);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "STAT_5MIN_CENTER_", param = "yyMm", param2 = "linkLevel")
    public int insertStat5MinCenterLevel(String yyMm, String linkLevel, String regDate) {
        return this.mapper.insertStat5MinCenterLevel(yyMm, linkLevel, regDate);
    }

    @SqlOperation(type = SqlOperation.SqlType.UPDATE, table = "STAT_5MIN_CENTER_", param = "yyMm", param2 = "regDate")
    public int updateStat5MinCenterTravelTime(String yyMm, String regDate) {
        return this.mapper.updateStat5MinCenterTravelTime(yyMm, regDate);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "STAT_5MIN_LOC_", param = "yyMm", param2 = "regDate")
    public int insertStat5MinLoc(String yyMm, String regDate, String codeValue4) {
        return this.mapper.insertStat5MinLoc(yyMm, regDate, codeValue4);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "STAT_5MIN_LOC_", param = "yyMm", param2 = "linkLevel")
    public int insertStat5MinLocLevel(String yyMm, String linkLevel, String regDate) {
        return this.mapper.insertStat5MinLocLevel(yyMm, linkLevel, regDate);
    }

    @SqlOperation(type = SqlOperation.SqlType.UPDATE, table = "STAT_5MIN_LOC_", param = "yyMm", param2 = "regDate")
    public int updateStat5MinLocTravelTime(String yyMm, String regDate) {
        return this.mapper.updateStat5MinLocTravelTime(yyMm, regDate);
    }

}
