trafficmonitor init...1

This commit is contained in:
choi.jh 2025-11-13 15:25:54 +09:00
parent 3fd18ab3db
commit 702d25b1be

View File

@ -104,7 +104,10 @@ class TrafficController extends AdminController
try { try {
// 모델 로드 및 데이터 조회 // 모델 로드 및 데이터 조회
$collectorService = service('collectorservice'); $collectorService = service('collectorservice');
$aggregateDatas = $collectorService->getAggregateDatas($entity, $startDate, $endDate); //기간의 시작 시점 (YYYY-MM-DD 00:00:00) 설정~기간의 종료 시점 (YYYY-MM-DD 23:59:59) 설정
$start_timestamp = $startDate . ' 00:00:00';
$end_timestamp = $endDate . ' 23:59:59';
$aggregateDatas = $collectorService->getAggregateDatas($entity, $start_timestamp, $end_timestamp);
// 데이터를 JSON 형식으로 반환 // 데이터를 JSON 형식으로 반환
return $this->response->setJSON([ return $this->response->setJSON([
'message' => sprintf("[%s~%s] %s 트랙픽차트 ", $startDate, $endDate, $entity->getCustomTitle()), 'message' => sprintf("[%s~%s] %s 트랙픽차트 ", $startDate, $endDate, $entity->getCustomTitle()),