package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CensusElements;
import com.ruoyi.system.domain.CensusItemNegativeInformation;
import com.ruoyi.system.mapper.CensusElementsMapper;
import com.ruoyi.system.mapper.CensusItemNegativeInformationMapper;
import com.ruoyi.system.service.ICensusElementsService;
import com.ruoyi.system.service.ICensusItemNegativeInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class CensusItemNegativeInformationServiceImpl implements ICensusItemNegativeInformationService {


    @Autowired
    private CensusItemNegativeInformationMapper censusItemNegativeInformationMapper;


    @Override
    public List<CensusItemNegativeInformation> selectCensusItemNegativeInformationList() {
        return censusItemNegativeInformationMapper.selectCensusItemNegativeInformationList();
    }

    @Override
    public void insertBatch(List<CensusItemNegativeInformation> list) {
        if (!CollectionUtils.isEmpty(list)) {
            censusItemNegativeInformationMapper.deleteCensusItemNegativeInformationAll();
        }
        censusItemNegativeInformationMapper.insertBatch(list);
    }
}
