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.DeviceInformationMonitorMapper;
import com.fastbee.deviceInfo.domain.DeviceInformationMonitor;
import com.fastbee.deviceInfo.service.IDeviceInformationMonitorService;

/**
 * 监控站设备基础信息Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-18
 */
@Service
public class DeviceInformationMonitorServiceImpl implements IDeviceInformationMonitorService 
{
    @Autowired
    private DeviceInformationMonitorMapper deviceInformationMonitorMapper;

    /**
     * 查询监控站设备基础信息
     * 
     * @param id 监控站设备基础信息主键
     * @return 监控站设备基础信息
     */
    @Override
    public DeviceInformationMonitor selectDeviceInformationMonitorById(String deviceEncoding)
    {
        return deviceInformationMonitorMapper.selectDeviceInformationMonitorById(deviceEncoding);
    }

    /**
     * 查询监控站设备基础信息列表
     * 
     * @param deviceInformationMonitor 监控站设备基础信息
     * @return 监控站设备基础信息
     */
    @Override
    public List<DeviceInformationMonitor> selectDeviceInformationMonitorList(DeviceInformationMonitor deviceInformationMonitor)
    {
        return deviceInformationMonitorMapper.selectDeviceInformationMonitorList(deviceInformationMonitor);
    }

    /**
     * 新增监控站设备基础信息
     * 
     * @param deviceInformationMonitor 监控站设备基础信息
     * @return 结果
     */
    @Override
    public int insertDeviceInformationMonitor(DeviceInformationMonitor deviceInformationMonitor)
    {
        deviceInformationMonitor.setCreateTime(DateUtils.getNowDate());
        return deviceInformationMonitorMapper.insertDeviceInformationMonitor(deviceInformationMonitor);
    }

    /**
     * 修改监控站设备基础信息
     * 
     * @param deviceInformationMonitor 监控站设备基础信息
     * @return 结果
     */
    @Override
    public int updateDeviceInformationMonitor(DeviceInformationMonitor deviceInformationMonitor)
    {
        deviceInformationMonitor.setUpdateTime(DateUtils.getNowDate());
        return deviceInformationMonitorMapper.updateDeviceInformationMonitor(deviceInformationMonitor);
    }

    /**
     * 批量删除监控站设备基础信息
     * 
     * @param ids 需要删除的监控站设备基础信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceInformationMonitorByIds(Long[] ids)
    {
        return deviceInformationMonitorMapper.deleteDeviceInformationMonitorByIds(ids);
    }

    /**
     * 删除监控站设备基础信息信息
     * 
     * @param id 监控站设备基础信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceInformationMonitorById(Long id)
    {
        return deviceInformationMonitorMapper.deleteDeviceInformationMonitorById(id);
    }
}
