package com.fastbee.deviceData.service.impl;

import java.util.List;
import com.fastbee.common.utils.DateUtils;
import com.fastbee.deviceData.domain.DeviceManufacturers;
import com.fastbee.deviceData.mapper.DeviceManufacturersMapper;
import com.fastbee.deviceData.service.IDeviceManufacturersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 设备厂家信息Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-11-13
 */
@Service
public class DeviceManufacturersServiceImpl implements IDeviceManufacturersService
{
    @Autowired
    private DeviceManufacturersMapper deviceManufacturersMapper;

    /**
     * 查询设备厂家信息
     * 
     * @param id 设备厂家信息主键
     * @return 设备厂家信息
     */
    @Override
    public DeviceManufacturers selectDeviceManufacturersById(Long id)
    {
        return deviceManufacturersMapper.selectDeviceManufacturersById(id);
    }

    /**
     * 查询设备厂家信息列表
     * 
     * @param deviceManufacturers 设备厂家信息
     * @return 设备厂家信息
     */
    @Override
    public List<DeviceManufacturers> selectDeviceManufacturersList(DeviceManufacturers deviceManufacturers)
    {
        return deviceManufacturersMapper.selectDeviceManufacturersList(deviceManufacturers);
    }

    /**
     * 新增设备厂家信息
     * 
     * @param deviceManufacturers 设备厂家信息
     * @return 结果
     */
    @Override
    public int insertDeviceManufacturers(DeviceManufacturers deviceManufacturers)
    {
        deviceManufacturers.setCreateTime(DateUtils.getNowDate());
        return deviceManufacturersMapper.insertDeviceManufacturers(deviceManufacturers);
    }

    /**
     * 修改设备厂家信息
     * 
     * @param deviceManufacturers 设备厂家信息
     * @return 结果
     */
    @Override
    public int updateDeviceManufacturers(DeviceManufacturers deviceManufacturers)
    {
        deviceManufacturers.setUpdateTime(DateUtils.getNowDate());
        return deviceManufacturersMapper.updateDeviceManufacturers(deviceManufacturers);
    }

    /**
     * 批量删除设备厂家信息
     * 
     * @param ids 需要删除的设备厂家信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceManufacturersByIds(Long[] ids)
    {
        return deviceManufacturersMapper.deleteDeviceManufacturersByIds(ids);
    }

    /**
     * 删除设备厂家信息信息
     * 
     * @param id 设备厂家信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceManufacturersById(Long id)
    {
        return deviceManufacturersMapper.deleteDeviceManufacturersById(id);
    }
}
