package com.zksy.base.warning.service.impl;

import com.zksy.base.warning.mapper.EarlyWarningMapper;
import com.zksy.base.warning.service.IEarlyWarningTrendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Service
public class EarlyWarningTrendServiceImpl implements IEarlyWarningTrendService {

    @Autowired
    private EarlyWarningMapper earlyWarningMapper;

    @Override
    public List<Map<String, Object>> getTrendByDay(LocalDateTime startTime, LocalDateTime endTime, String warningSpecial) {
        return earlyWarningMapper.selectWarningTrendByDay(startTime, endTime, warningSpecial);
    }

    @Override
    public List<Map<String, Object>> getTrendByMonth(LocalDateTime startTime, LocalDateTime endTime, String warningSpecial) {
        return earlyWarningMapper.selectWarningTrendByMonth(startTime, endTime, warningSpecial);
    }
}