package com.fastbee.deviceData.service.impl;

import java.util.List;

import com.fastbee.deviceData.service.IDeviceRealtimedataWormsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.deviceData.mapper.DeviceRealtimedataWormsMapper;
import com.fastbee.deviceData.domain.DeviceRealtimedataWorms;


/**
 * 虫情设备实时数据Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-07
 */
@Service
public class  DeviceRealtimedataWormsServiceImpl implements IDeviceRealtimedataWormsService
{
    @Autowired
    private DeviceRealtimedataWormsMapper deviceRealtimedataWormsMapper;

    /**
     * 查询虫情设备实时数据
     *
     * @param id 虫情设备实时数据主键
     * @return 虫情设备实时数据
     */
    @Override
    public DeviceRealtimedataWorms selectDeviceRealtimedataWormsById(Long id)
    {
        return deviceRealtimedataWormsMapper.selectDeviceRealtimedataWormsById(id);
    }

    /**
     * 查询虫情设备实时数据列表
     * 
     * @param deviceRealtimedataWorms 虫情设备实时数据
     * @return 虫情设备实时数据
     */
    @Override
    public List<DeviceRealtimedataWorms> selectDeviceRealtimedataWormsList(DeviceRealtimedataWorms deviceRealtimedataWorms)
    {
        return deviceRealtimedataWormsMapper.selectDeviceRealtimedataWormsList(deviceRealtimedataWorms);
    }

    /**
     * 新增虫情设备实时数据
     * 
     * @param deviceRealtimedataWorms 虫情设备实时数据
     * @return 结果
     */
    @Override
    public int insertDeviceRealtimedataWorms(DeviceRealtimedataWorms deviceRealtimedataWorms)
    {
//        return deviceRealtimedataWormsMapper.insert(deviceRealtimedataWorms);
        return 1;
    }

    /**
     * 修改虫情设备实时数据
     * 
     * @param deviceRealtimedataWorms 虫情设备实时数据
     * @return 结果
     */
    @Override
    public int updateDeviceRealtimedataWorms(DeviceRealtimedataWorms deviceRealtimedataWorms)
    {
        return deviceRealtimedataWormsMapper.updateDeviceRealtimedataWorms(deviceRealtimedataWorms);
    }

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

    /**
     * 删除虫情设备实时数据信息
     * 
     * @param id 虫情设备实时数据主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRealtimedataWormsById(Long id)
    {
        return deviceRealtimedataWormsMapper.deleteDeviceRealtimedataWormsById(id);
    }
}
