package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CensusElements;
import com.ruoyi.system.domain.ColumnPageView;
import com.ruoyi.system.mapper.CensusElementsMapper;
import com.ruoyi.system.mapper.ColumnPageViewMapper;
import com.ruoyi.system.service.ICensusElementsService;
import com.ruoyi.system.service.IColumnPageViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class CensusElementsServiceImpl implements ICensusElementsService {


    @Autowired
    private CensusElementsMapper censusElementsMapper;


    @Override
    public List<CensusElements> selectCensusElementsList() {
        return censusElementsMapper.selectCensusElementsList();
    }

    @Override
    public void insertBatch(List<CensusElements> list) {
        if (!CollectionUtils.isEmpty(list)) {
            censusElementsMapper.deleteCensusElementsAll();
        }
        censusElementsMapper.insertBatch(list);
    }
}
