package org.jeecg.modules.sensor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.sensor.entity.BuSensorData;
import org.jeecg.modules.sensor.model.BuSensorModel;

import java.util.List;

/**
 * @Description: 传感器数据表
 * @Author: jeecg-boot
 * @Date:   2020-12-23
 * @Version: V1.0
 */
public interface BuSensorDataMapper extends BaseMapper<BuSensorData> {

	public boolean deleteByMainId(@Param("mainId") String mainId);

	public List<BuSensorData> getSensorData();

	public BuSensorData selectByMainId(@Param("mainId") String mainId);

	public BuSensorData getDataByDeviceId(@Param("deviceId") String deviceId);

	public IPage<BuSensorModel> getRealTimeSensorDataByDeviceId(Page page, @Param("deviceId") String deviceId);

}
