package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CountyAndDistrictMisprint;
import com.ruoyi.system.domain.MunicipalErrorLinkMonitor;
import com.ruoyi.system.mapper.CountyAndDistrictMisprintMapper;
import com.ruoyi.system.mapper.MunicipalErrorLinkMonitorMapper;
import com.ruoyi.system.service.ICountyAndDistrictMisprintService;
import com.ruoyi.system.service.IMunicipalErrorLinkMonitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class MunicipalErrorLinkMonitorServiceImpl implements IMunicipalErrorLinkMonitorService {


    @Autowired
    private MunicipalErrorLinkMonitorMapper municipalErrorLinkMonitorMapper;


    @Override
    public List<MunicipalErrorLinkMonitor> selectMunicipalErrorLinkMonitorList() {
        return municipalErrorLinkMonitorMapper.selectMunicipalErrorLinkMonitorList();
    }

    @Override
    public void insertBatch(List<MunicipalErrorLinkMonitor> list) {
        if (!CollectionUtils.isEmpty(list)) {
            municipalErrorLinkMonitorMapper.deleteMunicipalErrorLinkMonitorAll();
        }
        municipalErrorLinkMonitorMapper.insertBatch(list);
    }
}
