package com.fastbee.deviceData.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.deviceData.mapper.DeviceRealtimedataMoistureMapper;
import com.fastbee.deviceData.domain.DeviceRealtimedataMoisture;
import com.fastbee.deviceData.service.IDeviceRealtimedataMoistureService;

/**
 * 墒情实时数据Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-14
 */
@Service
public class DeviceRealtimedataMoistureServiceImpl implements IDeviceRealtimedataMoistureService 
{
    @Autowired
    private DeviceRealtimedataMoistureMapper deviceRealtimedataMoistureMapper;

    /**
     * 查询墒情实时数据
     * 
     * @param id 墒情实时数据主键
     * @return 墒情实时数据
     */
    @Override
    public DeviceRealtimedataMoisture selectDeviceRealtimedataMoistureById(Long id)
    {
        return deviceRealtimedataMoistureMapper.selectDeviceRealtimedataMoistureById(id);
    }

    /**
     * 查询墒情实时数据列表
     * 
     * @param deviceRealtimedataMoisture 墒情实时数据
     * @return 墒情实时数据
     */
    @Override
    public List<DeviceRealtimedataMoisture> selectDeviceRealtimedataMoistureList(DeviceRealtimedataMoisture deviceRealtimedataMoisture)
    {
        return deviceRealtimedataMoistureMapper.selectDeviceRealtimedataMoistureList(deviceRealtimedataMoisture);
    }

    /**
     * 新增墒情实时数据
     * 
     * @param deviceRealtimedataMoisture 墒情实时数据
     * @return 结果
     */
    @Override
    public int insertDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture)
    {
        return deviceRealtimedataMoistureMapper.insertDeviceRealtimedataMoisture(deviceRealtimedataMoisture);
    }

    /**
     * 修改墒情实时数据
     * 
     * @param deviceRealtimedataMoisture 墒情实时数据
     * @return 结果
     */
    @Override
    public int updateDeviceRealtimedataMoisture(DeviceRealtimedataMoisture deviceRealtimedataMoisture)
    {
        return deviceRealtimedataMoistureMapper.updateDeviceRealtimedataMoisture(deviceRealtimedataMoisture);
    }

    /**
     * 批量删除墒情实时数据
     * 
     * @param ids 需要删除的墒情实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRealtimedataMoistureByIds(Long[] ids)
    {
        return deviceRealtimedataMoistureMapper.deleteDeviceRealtimedataMoistureByIds(ids);
    }

    /**
     * 删除墒情实时数据信息
     * 
     * @param id 墒情实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRealtimedataMoistureById(Long id)
    {
        return deviceRealtimedataMoistureMapper.deleteDeviceRealtimedataMoistureById(id);
    }
}
