package com.dbnt.kcscbackend.admin.logs.service;

import com.dbnt.kcscbackend.admin.logs.repository.FileLogsRepository;
import lombok.RequiredArgsConstructor;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class AdminFileService extends EgovAbstractServiceImpl {
    private final FileLogsRepository fileLogsRepository;

    // 파일 다운 횟수
    public List<Object[]> selectFileCount(String startDate, String endDate) {
        return fileLogsRepository.selectCountFile(startDate, endDate);
    }

    // 전체 레코드 수 가져오기
    public long selectFileCountCnt(String startDate, String endDate) {
        return fileLogsRepository.countDistinctFileIds(startDate, endDate);
    }

}
