package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.AreaInteractiveColumns;
import com.ruoyi.system.domain.CensusElements;
import com.ruoyi.system.mapper.AreaInteractiveColumnsMapper;
import com.ruoyi.system.mapper.CensusElementsMapper;
import com.ruoyi.system.service.IAreaInteractiveColumnsService;
import com.ruoyi.system.service.ICensusElementsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class AreaInteractiveColumnsServiceImpl implements IAreaInteractiveColumnsService {


    @Autowired
    private AreaInteractiveColumnsMapper areaInteractiveColumnsMapper;


    @Override
    public List<AreaInteractiveColumns> selectAreaInteractiveColumnsList() {
        return areaInteractiveColumnsMapper.selectAreaInteractiveColumnsList();
    }

    @Override
    public void insertBatch(List<AreaInteractiveColumns> list) {
        if (!CollectionUtils.isEmpty(list)) {
            areaInteractiveColumnsMapper.deleteAreaInteractiveColumnsAll();
        }
        areaInteractiveColumnsMapper.insertBatch(list);
    }
}
