package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.MunicipalMisprint;
import com.ruoyi.system.domain.WebSiteTenDaysHits;
import com.ruoyi.system.mapper.MunicipalMisprintMapper;
import com.ruoyi.system.mapper.WebSiteTenDaysHitsMapper;
import com.ruoyi.system.service.IMunicipalMisprintService;
import com.ruoyi.system.service.IWebSiteTenDaysHitsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class MunicipalMisprintServiceImpl implements IMunicipalMisprintService {


    @Autowired
    private MunicipalMisprintMapper municipalMisprintMapper;


    @Override
    public List<MunicipalMisprint> selectMunicipalMisprintList() {
        return municipalMisprintMapper.selectMunicipalMisprintList();
    }

    @Override
    public void insertBatch(List<MunicipalMisprint> list) {
        if (!CollectionUtils.isEmpty(list)) {
            municipalMisprintMapper.deleteMunicipalMisprintAll();
        }
        municipalMisprintMapper.insertBatch(list);
    }
}
