package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CountyAndDistrictMisprint;
import com.ruoyi.system.domain.MunicipalMisprint;
import com.ruoyi.system.mapper.CountyAndDistrictMisprintMapper;
import com.ruoyi.system.mapper.MunicipalMisprintMapper;
import com.ruoyi.system.service.ICountyAndDistrictMisprintService;
import com.ruoyi.system.service.IMunicipalMisprintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class CountyAndDistrictMisprintServiceImpl implements ICountyAndDistrictMisprintService {


    @Autowired
    private CountyAndDistrictMisprintMapper countyAndDistrictMisprintMapper;


    @Override
    public List<CountyAndDistrictMisprint> selectCountyAndDistrictMisprintList() {
        return countyAndDistrictMisprintMapper.selectCountyAndDistrictMisprintList();
    }

    @Override
    public void insertBatch(List<CountyAndDistrictMisprint> list) {
        if (!CollectionUtils.isEmpty(list)) {
            countyAndDistrictMisprintMapper.deleteCountyAndDistrictMisprintAll();
        }
        countyAndDistrictMisprintMapper.insertBatch(list);
    }
}
