package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CensusElements;
import com.ruoyi.system.domain.CountyInteractiveColumns;
import com.ruoyi.system.mapper.CensusElementsMapper;
import com.ruoyi.system.mapper.CountyInteractiveColumnsMapper;
import com.ruoyi.system.service.ICensusElementsService;
import com.ruoyi.system.service.ICountyInteractiveColumnsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class CountyInteractiveColumnsServiceImpl implements ICountyInteractiveColumnsService {


    @Autowired
    private CountyInteractiveColumnsMapper countyInteractiveColumnsMapper;


    @Override
    public List<CountyInteractiveColumns> selectCountyInteractiveColumnsList() {
        return countyInteractiveColumnsMapper.selectCountyInteractiveColumnsList();
    }

    @Override
    public void insertBatch(List<CountyInteractiveColumns> list) {
        if (!CollectionUtils.isEmpty(list)) {
            countyInteractiveColumnsMapper.deleteCountyInteractiveColumnsAll();
        }
        countyInteractiveColumnsMapper.insertBatch(list);
    }
}
