package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.UnableToAccessWebsiteListToday;
import com.ruoyi.system.domain.WebSiteTenDaysHits;
import com.ruoyi.system.mapper.UnableToAccessWebsiteListTodayMapper;
import com.ruoyi.system.mapper.WebSiteTenDaysHitsMapper;
import com.ruoyi.system.service.IUnableToAccessWebsiteListTodayService;
import com.ruoyi.system.service.IWebSiteTenDaysHitsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;


@Service
public class UnableToAccessWebsiteListTodayImpl implements IUnableToAccessWebsiteListTodayService {


    @Autowired
    private UnableToAccessWebsiteListTodayMapper unableToAccessWebsiteListTodayMapper;


    @Override
    public List<UnableToAccessWebsiteListToday> selectUnableToAccessWebsiteListTodayList() {
        return unableToAccessWebsiteListTodayMapper.selectUnableToAccessWebsiteListTodayList();
    }

    @Override
    public void insertBatch(List<UnableToAccessWebsiteListToday> list) {
        if (!CollectionUtils.isEmpty(list)) {
            unableToAccessWebsiteListTodayMapper.deleteUnableToAccessWebsiteListTodayAll();
        }
        unableToAccessWebsiteListTodayMapper.insertBatch(list);
    }
}
