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

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

import java.time.LocalDate;
import java.util.List;

@Service
@RequiredArgsConstructor
public class AdminMenuService extends EgovAbstractServiceImpl {
    private final MenuLogsRepository menuLogsRepository;

    // 메뉴별 접속횟수
    public List<Object[]> selectMenuCount(String startDate, String endDate) {
        return menuLogsRepository.selectCountMenu(startDate, endDate);
    }

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

}
