package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CountyDailyUpdateRanking;
import com.ruoyi.system.domain.MunicipalInteractiveColumns;
import com.ruoyi.system.mapper.CountyDailyUpdateRankingMapper;
import com.ruoyi.system.mapper.MunicipalInteractiveColumnsMapper;
import com.ruoyi.system.service.ICountyDailyUpdateRankingService;
import com.ruoyi.system.service.IMunicipalInteractiveColumnsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class MunicipalInteractiveColumnsServiceImpl implements IMunicipalInteractiveColumnsService {


    @Autowired
    private MunicipalInteractiveColumnsMapper municipalInteractiveColumnsMapper;


    @Override
    public List<MunicipalInteractiveColumns> selectMunicipalInteractiveColumnsList() {
        return municipalInteractiveColumnsMapper.selectMunicipalInteractiveColumnsList();
    }

    @Override
    public void insertBatch(List<MunicipalInteractiveColumns> list) {
        if (!CollectionUtils.isEmpty(list)) {
            municipalInteractiveColumnsMapper.deleteMunicipalInteractiveColumnsAll();
        }
        municipalInteractiveColumnsMapper.insertBatch(list);
    }
}
