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.DeviceRealtimedataMeteorologyMapper;
import com.fastbee.deviceData.domain.DeviceRealtimedataMeteorology;
import com.fastbee.deviceData.service.IDeviceRealtimedataMeteorologyService;

/**
 * 气象设备实时数据Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-14
 */
@Service
public class DeviceRealtimedataMeteorologyServiceImpl implements IDeviceRealtimedataMeteorologyService 
{
    @Autowired
    private DeviceRealtimedataMeteorologyMapper deviceRealtimedataMeteorologyMapper;

    /**
     * 查询气象设备实时数据
     * 
     * @param id 气象设备实时数据主键
     * @return 气象设备实时数据
     */
    @Override
    public DeviceRealtimedataMeteorology selectDeviceRealtimedataMeteorologyById(Long id)
    {
        return deviceRealtimedataMeteorologyMapper.selectDeviceRealtimedataMeteorologyById(id);
    }

    /**
     * 查询气象设备实时数据列表
     * 
     * @param deviceRealtimedataMeteorology 气象设备实时数据
     * @return 气象设备实时数据
     */
    @Override
    public List<DeviceRealtimedataMeteorology> selectDeviceRealtimedataMeteorologyList(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology)
    {
        return deviceRealtimedataMeteorologyMapper.selectDeviceRealtimedataMeteorologyList(deviceRealtimedataMeteorology);
    }

    /**
     * 新增气象设备实时数据
     * 
     * @param deviceRealtimedataMeteorology 气象设备实时数据
     * @return 结果
     */
    @Override
    public int insertDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology)
    {
        deviceRealtimedataMeteorology.setCreateTime(DateUtils.getNowDate());
        return deviceRealtimedataMeteorologyMapper.insertDeviceRealtimedataMeteorology(deviceRealtimedataMeteorology);
    }

    /**
     * 修改气象设备实时数据
     * 
     * @param deviceRealtimedataMeteorology 气象设备实时数据
     * @return 结果
     */
    @Override
    public int updateDeviceRealtimedataMeteorology(DeviceRealtimedataMeteorology deviceRealtimedataMeteorology)
    {
        deviceRealtimedataMeteorology.setUpdateTime(DateUtils.getNowDate());
        return deviceRealtimedataMeteorologyMapper.updateDeviceRealtimedataMeteorology(deviceRealtimedataMeteorology);
    }

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

    /**
     * 删除气象设备实时数据信息
     * 
     * @param id 气象设备实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRealtimedataMeteorologyById(Long id)
    {
        return deviceRealtimedataMeteorologyMapper.deleteDeviceRealtimedataMeteorologyById(id);
    }
}
