package com.xinda.iot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xinda.iot.mapper.DeviceModelMapper;
import com.xinda.iot.domain.DeviceModel;
import com.xinda.iot.service.IDeviceModelService;

/**
 * 产品型号Service业务层处理
 * 
 * @author kerwincui
 * @date 2025-01-20
 */
@Service
public class DeviceModelServiceImpl implements IDeviceModelService 
{
    @Autowired
    private DeviceModelMapper deviceModelMapper;

    /**
     * 查询产品型号
     * 
     * @param id 产品型号主键
     * @return 产品型号
     */
    @Override
    public DeviceModel selectDeviceModelById(Long id)
    {
        return deviceModelMapper.selectDeviceModelById(id);
    }

    /**
     * 查询产品型号列表
     * 
     * @param deviceModel 产品型号
     * @return 产品型号
     */
    @Override
    public List<DeviceModel> selectDeviceModelList(DeviceModel deviceModel)
    {
        return deviceModelMapper.selectDeviceModelList(deviceModel);
    }

    /**
     * 新增产品型号
     * 
     * @param deviceModel 产品型号
     * @return 结果
     */
    @Override
    public int insertDeviceModel(DeviceModel deviceModel)
    {
        return deviceModelMapper.insertDeviceModel(deviceModel);
    }

    /**
     * 修改产品型号
     * 
     * @param deviceModel 产品型号
     * @return 结果
     */
    @Override
    public int updateDeviceModel(DeviceModel deviceModel)
    {
        return deviceModelMapper.updateDeviceModel(deviceModel);
    }

    /**
     * 批量删除产品型号
     * 
     * @param ids 需要删除的产品型号主键
     * @return 结果
     */
    @Override
    public int deleteDeviceModelByIds(Long[] ids)
    {
        return deviceModelMapper.deleteDeviceModelByIds(ids);
    }

    /**
     * 删除产品型号信息
     * 
     * @param id 产品型号主键
     * @return 结果
     */
    @Override
    public int deleteDeviceModelById(Long id)
    {
        return deviceModelMapper.deleteDeviceModelById(id);
    }
}
