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

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

import java.util.List;

@Service
@RequiredArgsConstructor
public class AdminUserService extends EgovAbstractServiceImpl {
    private final UserLogsRepository userLogsRepository;

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

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

}
