package com.fastbee.deviceInfo.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.deviceInfo.mapper.DeviceInformationMeteorologyMapper;
import com.fastbee.deviceInfo.domain.DeviceInformationMeteorology;
import com.fastbee.deviceInfo.service.IDeviceInformationMeteorologyService;

/**
 * 气象设备基础信息Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-18
 */
@Service
public class DeviceInformationMeteorologyServiceImpl implements IDeviceInformationMeteorologyService 
{
    @Autowired
    private DeviceInformationMeteorologyMapper deviceInformationMeteorologyMapper;

    /**
     * 查询气象设备基础信息
     * 
     * @param id 气象设备基础信息主键
     * @return 气象设备基础信息
     */
    @Override
    public DeviceInformationMeteorology selectDeviceInformationMeteorologyById(Long id)
    {
        return deviceInformationMeteorologyMapper.selectDeviceInformationMeteorologyById(id);
    }

    /**
     * 查询气象设备基础信息列表
     * 
     * @param deviceInformationMeteorology 气象设备基础信息
     * @return 气象设备基础信息
     */
    @Override
    public List<DeviceInformationMeteorology> selectDeviceInformationMeteorologyList(DeviceInformationMeteorology deviceInformationMeteorology)
    {
        return deviceInformationMeteorologyMapper.selectDeviceInformationMeteorologyList(deviceInformationMeteorology);
    }

    /**
     * 新增气象设备基础信息
     * 
     * @param deviceInformationMeteorology 气象设备基础信息
     * @return 结果
     */
    @Override
    public int insertDeviceInformationMeteorology(DeviceInformationMeteorology deviceInformationMeteorology)
    {
        deviceInformationMeteorology.setCreateTime(DateUtils.getNowDate());
        return deviceInformationMeteorologyMapper.insertDeviceInformationMeteorology(deviceInformationMeteorology);
    }

    /**
     * 修改气象设备基础信息
     * 
     * @param deviceInformationMeteorology 气象设备基础信息
     * @return 结果
     */
    @Override
    public int updateDeviceInformationMeteorology(DeviceInformationMeteorology deviceInformationMeteorology)
    {
        deviceInformationMeteorology.setUpdateTime(DateUtils.getNowDate());
        return deviceInformationMeteorologyMapper.updateDeviceInformationMeteorology(deviceInformationMeteorology);
    }

    /**
     * 批量删除气象设备基础信息
     * 
     * @param ids 需要删除的气象设备基础信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceInformationMeteorologyByIds(Long[] ids)
    {
        return deviceInformationMeteorologyMapper.deleteDeviceInformationMeteorologyByIds(ids);
    }

    /**
     * 删除气象设备基础信息信息
     * 
     * @param id 气象设备基础信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceInformationMeteorologyById(Long id)
    {
        return deviceInformationMeteorologyMapper.deleteDeviceInformationMeteorologyById(id);
    }
}
