package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EquipmentConfigurationMapper;
import com.ruoyi.system.domain.EquipmentConfiguration;
import com.ruoyi.system.service.IEquipmentConfigurationService;

/**
 * 设备配置（控制抓拍一体机）Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
@Service
public class EquipmentConfigurationServiceImpl implements IEquipmentConfigurationService 
{
    @Autowired
    private EquipmentConfigurationMapper equipmentConfigurationMapper;

    /**
     * 查询设备配置（控制抓拍一体机）
     * 
     * @param equipmentId 设备配置（控制抓拍一体机）主键
     * @return 设备配置（控制抓拍一体机）
     */
    @Override
    public EquipmentConfiguration selectEquipmentConfigurationByEquipmentId(Long equipmentId)
    {
        return equipmentConfigurationMapper.selectEquipmentConfigurationByEquipmentId(equipmentId);
    }

    /**
     * 查询设备配置（控制抓拍一体机）列表
     * 
     * @param equipmentConfiguration 设备配置（控制抓拍一体机）
     * @return 设备配置（控制抓拍一体机）
     */
    @Override
    public List<EquipmentConfiguration> selectEquipmentConfigurationList(EquipmentConfiguration equipmentConfiguration)
    {
        return equipmentConfigurationMapper.selectEquipmentConfigurationList(equipmentConfiguration);
    }

    /**
     * 新增设备配置（控制抓拍一体机）
     * 
     * @param equipmentConfiguration 设备配置（控制抓拍一体机）
     * @return 结果
     */
    @Override
    public int insertEquipmentConfiguration(EquipmentConfiguration equipmentConfiguration)
    {
        equipmentConfiguration.setCreateTime(DateUtils.getNowDate());
        return equipmentConfigurationMapper.insertEquipmentConfiguration(equipmentConfiguration);
    }

    /**
     * 修改设备配置（控制抓拍一体机）
     * 
     * @param equipmentConfiguration 设备配置（控制抓拍一体机）
     * @return 结果
     */
    @Override
    public int updateEquipmentConfiguration(EquipmentConfiguration equipmentConfiguration)
    {
        equipmentConfiguration.setUpdateTime(DateUtils.getNowDate());
        return equipmentConfigurationMapper.updateEquipmentConfiguration(equipmentConfiguration);
    }

    /**
     * 批量删除设备配置（控制抓拍一体机）
     * 
     * @param equipmentIds 需要删除的设备配置（控制抓拍一体机）主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentConfigurationByEquipmentIds(Long[] equipmentIds)
    {
        return equipmentConfigurationMapper.deleteEquipmentConfigurationByEquipmentIds(equipmentIds);
    }

    /**
     * 删除设备配置（控制抓拍一体机）信息
     * 
     * @param equipmentId 设备配置（控制抓拍一体机）主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentConfigurationByEquipmentId(Long equipmentId)
    {
        return equipmentConfigurationMapper.deleteEquipmentConfigurationByEquipmentId(equipmentId);
    }

    @Override
    public EquipmentConfiguration selectEquipmentConfigurationByEquipmentName(String equipmentName) {
        return equipmentConfigurationMapper.selectEquipmentConfigurationByEquipmentName(equipmentName);
    }
}
