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.DeviceInformationTargetpestsMapper;
import com.fastbee.deviceInfo.domain.DeviceInformationTargetpests;
import com.fastbee.deviceInfo.service.IDeviceInformationTargetpestsService;

/**
 * 靶标害虫设备基础信息Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-18
 */
@Service
public class DeviceInformationTargetpestsServiceImpl implements IDeviceInformationTargetpestsService 
{
    @Autowired
    private DeviceInformationTargetpestsMapper deviceInformationTargetpestsMapper;

    /**
     * 查询靶标害虫设备基础信息
     * 
     * @param id 靶标害虫设备基础信息主键
     * @return 靶标害虫设备基础信息
     */
    @Override
    public DeviceInformationTargetpests selectDeviceInformationTargetpestsById(String deviceEncoding)
    {
        return deviceInformationTargetpestsMapper.selectDeviceInformationTargetpestsById(deviceEncoding);
    }

    /**
     * 查询靶标害虫设备基础信息列表
     * 
     * @param deviceInformationTargetpests 靶标害虫设备基础信息
     * @return 靶标害虫设备基础信息
     */
    @Override
    public List<DeviceInformationTargetpests> selectDeviceInformationTargetpestsList(DeviceInformationTargetpests deviceInformationTargetpests)
    {
        return deviceInformationTargetpestsMapper.selectDeviceInformationTargetpestsList(deviceInformationTargetpests);
    }

    /**
     * 新增靶标害虫设备基础信息
     * 
     * @param deviceInformationTargetpests 靶标害虫设备基础信息
     * @return 结果
     */
    @Override
    public int insertDeviceInformationTargetpests(DeviceInformationTargetpests deviceInformationTargetpests)
    {
        deviceInformationTargetpests.setCreateTime(DateUtils.getNowDate());
        return deviceInformationTargetpestsMapper.insertDeviceInformationTargetpests(deviceInformationTargetpests);
    }

    /**
     * 修改靶标害虫设备基础信息
     * 
     * @param deviceInformationTargetpests 靶标害虫设备基础信息
     * @return 结果
     */
    @Override
    public int updateDeviceInformationTargetpests(DeviceInformationTargetpests deviceInformationTargetpests)
    {
        deviceInformationTargetpests.setUpdateTime(DateUtils.getNowDate());
        return deviceInformationTargetpestsMapper.updateDeviceInformationTargetpests(deviceInformationTargetpests);
    }

    /**
     * 批量删除靶标害虫设备基础信息
     * 
     * @param ids 需要删除的靶标害虫设备基础信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceInformationTargetpestsByIds(Long[] ids)
    {
        return deviceInformationTargetpestsMapper.deleteDeviceInformationTargetpestsByIds(ids);
    }

    /**
     * 删除靶标害虫设备基础信息信息
     * 
     * @param id 靶标害虫设备基础信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceInformationTargetpestsById(Long id)
    {
        return deviceInformationTargetpestsMapper.deleteDeviceInformationTargetpestsById(id);
    }
}
