package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.ColumnPageView;
import com.ruoyi.system.domain.WebSiteTenDaysHits;
import com.ruoyi.system.mapper.ColumnPageViewMapper;
import com.ruoyi.system.mapper.WebSiteTenDaysHitsMapper;
import com.ruoyi.system.service.IColumnPageViewService;
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 ColumnPageViewServiceImpl implements IColumnPageViewService {


    @Autowired
    private ColumnPageViewMapper columnPageViewMapper;


    @Override
    public List<ColumnPageView> selectColumnPageViewList() {
        return columnPageViewMapper.selectColumnPageViewList();
    }

    @Override
    public void insertBatch(List<ColumnPageView> list) {
        if (!CollectionUtils.isEmpty(list)) {
            columnPageViewMapper.deleteColumnPageViewAll();
        }
        columnPageViewMapper.insertBatch(list);
    }
}
