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

import com.utic.center.common.annotation.SqlOperation;
import com.utic.center.utic.stat.server.dao.mapper.dwdb.UticStat04MinEtlpMapper;
import com.utic.center.utic.stat.server.dto.TrafficCenterDto;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
@RequiredArgsConstructor
public class UticStat04MinEtlpRepository {

    private final UticStat04MinEtlpMapper mapper;

    @SqlOperation(type = SqlOperation.SqlType.SELECT, table = "TRAFFIC_CENTER@UTISDB")
    public TrafficCenterDto findTrafficCenter() {
        return this.mapper.findTrafficCenter();
    }

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

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "RCV_LINK_TRAFFIC_", param = "yyMm", param2 = "past10Min")
    public int insertRcvLinkTraffic(String yyMm, String past10Min) {
        return this.mapper.insertRcvLinkTraffic(yyMm, past10Min);
    }

}
