package com.fastbee.deviceData.service.impl;

import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.deviceData.mapper.DeviceRealtimedataMiaoqingMapper;
import com.fastbee.deviceData.domain.DeviceRealtimedataMiaoqing;
import com.fastbee.deviceData.service.IDeviceRealtimedataMiaoqingService;

/**
 * 苗青设备实时数据Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-14
 */
@Service
public class DeviceRealtimedataMiaoqingServiceImpl implements IDeviceRealtimedataMiaoqingService 
{
    @Autowired
    private DeviceRealtimedataMiaoqingMapper deviceRealtimedataMiaoqingMapper;

    /**
     * 查询苗青设备实时数据
     * 
     * @param id 苗青设备实时数据主键
     * @return 苗青设备实时数据
     */
    @Override
    public DeviceRealtimedataMiaoqing selectDeviceRealtimedataMiaoqingById(Long id)
    {
        return deviceRealtimedataMiaoqingMapper.selectDeviceRealtimedataMiaoqingById(id);
    }

    /**
     * 查询苗青设备实时数据列表
     * 
     * @param deviceRealtimedataMiaoqing 苗青设备实时数据
     * @return 苗青设备实时数据
     */
    @Override
    public List<DeviceRealtimedataMiaoqing> selectDeviceRealtimedataMiaoqingList(DeviceRealtimedataMiaoqing deviceRealtimedataMiaoqing)
    {
        return deviceRealtimedataMiaoqingMapper.selectDeviceRealtimedataMiaoqingList(deviceRealtimedataMiaoqing);
    }

    /**
     * 新增苗青设备实时数据
     * 
     * @param deviceRealtimedataMiaoqing 苗青设备实时数据
     * @return 结果
     */
    @Override
    public int insertDeviceRealtimedataMiaoqing(DeviceRealtimedataMiaoqing deviceRealtimedataMiaoqing)
    {
        deviceRealtimedataMiaoqing.setCreateTime(DateUtils.getNowDate());
        return deviceRealtimedataMiaoqingMapper.insertDeviceRealtimedataMiaoqing(deviceRealtimedataMiaoqing);
    }

    /**
     * 修改苗青设备实时数据
     * 
     * @param deviceRealtimedataMiaoqing 苗青设备实时数据
     * @return 结果
     */
    @Override
    public int updateDeviceRealtimedataMiaoqing(DeviceRealtimedataMiaoqing deviceRealtimedataMiaoqing)
    {
        return deviceRealtimedataMiaoqingMapper.updateDeviceRealtimedataMiaoqing(deviceRealtimedataMiaoqing);
    }

    /**
     * 批量删除苗青设备实时数据
     * 
     * @param ids 需要删除的苗青设备实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRealtimedataMiaoqingByIds(Long[] ids)
    {
        return deviceRealtimedataMiaoqingMapper.deleteDeviceRealtimedataMiaoqingByIds(ids);
    }

    /**
     * 删除苗青设备实时数据信息
     * 
     * @param id 苗青设备实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRealtimedataMiaoqingById(Long id)
    {
        return deviceRealtimedataMiaoqingMapper.deleteDeviceRealtimedataMiaoqingById(id);
    }
}
