package org.jeecg.modules.energy.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.energy.entity.BuAirQuality;
import org.jeecg.modules.energy.mapper.BuAirQualityMapper;
import org.jeecg.modules.energy.service.IBuAirQualityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: bu_air_quality
 * @Author: jeecg-boot
 * @Date:   2024-05-09
 * @Version: V1.0
 */
@Service
public class BuAirQualityServiceImpl extends ServiceImpl<BuAirQualityMapper, BuAirQuality> implements IBuAirQualityService {

    @Autowired
    private BuAirQualityMapper buAirQualityMapper;

//    @Override
//    public BuAirQuality getBySensorId(String tableName, String sensorId){
//        return buAirQualityMapper.getBySensorId(tableName,sensorId);
//    }
    @Override
    public List<BuAirQuality> getBySensorId(String tableName, String sensorId){
        return buAirQualityMapper.getBySensorId(tableName,sensorId);
    }
    @Override
    public List<BuAirQuality> getAirQualityData() {
        return buAirQualityMapper.getAirQualityData();
    }
    @Override
    public List<BuAirQuality> getAirQualityByStatus() {
        return buAirQualityMapper.getAirQualityByStatus();
    }

    @Override
    public List<BuAirQuality> getByTableName(String tableName) {
        return buAirQualityMapper.getByTableName(tableName);
    }

    @Override
    public IPage<BuAirQuality> selectByDynamicTable(Page<BuAirQuality> page, String tableName, String deviceId, String sensorId, String beginTime, String endTime) {
        return buAirQualityMapper.selectByDynamicTable(page,tableName,deviceId,sensorId,beginTime,endTime);
    }
    @Override
    public List<BuAirQuality> selectByDynamicTable(String tableName, String deviceId, String sensorId, String beginTime, String endTime) {
        return buAirQualityMapper.selectByDynamicTable(tableName,deviceId,sensorId,beginTime,endTime);
    }
}
