package com.inspur.service.impl;

import java.util.List;
import com.inspur.common.utils.DateUtils;
import com.inspur.domain.ElevatorGatewayInfo;
import com.inspur.mapper.ElevatorGatewayInfoMapper;
import com.inspur.service.IElevatorGatewayInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 语音网关Service业务层处理
 *
 * @author inspur
 * @date 2024-09-30
 */
@Service
public class ElevatorGatewayInfoServiceImpl implements IElevatorGatewayInfoService
{
    @Autowired
    private ElevatorGatewayInfoMapper elevatorGatewayInfoMapper;

    /**
     * 查询语音网关
     *
     * @param id 语音网关主键
     * @return 语音网关
     */
    @Override
    public ElevatorGatewayInfo selectElevatorGatewayInfoById(Long id)
    {
        return elevatorGatewayInfoMapper.selectElevatorGatewayInfoById(id);
    }

    /**
     * 查询语音网关列表
     *
     * @param elevatorGatewayInfo 语音网关
     * @return 语音网关
     */
    @Override
    public List<ElevatorGatewayInfo> selectElevatorGatewayInfoList(ElevatorGatewayInfo elevatorGatewayInfo)
    {
        return elevatorGatewayInfoMapper.selectElevatorGatewayInfoList(elevatorGatewayInfo);
    }

    /**
     * 新增语音网关
     *
     * @param elevatorGatewayInfo 语音网关
     * @return 结果
     */
    @Override
    public int insertElevatorGatewayInfo(ElevatorGatewayInfo elevatorGatewayInfo)
    {
        elevatorGatewayInfo.setCreateTime(DateUtils.getNowDate());
        return elevatorGatewayInfoMapper.insertElevatorGatewayInfo(elevatorGatewayInfo);
    }

    /**
     * 修改语音网关
     *
     * @param elevatorGatewayInfo 语音网关
     * @return 结果
     */
    @Override
    public int updateElevatorGatewayInfo(ElevatorGatewayInfo elevatorGatewayInfo)
    {
        elevatorGatewayInfo.setUpdateTime(DateUtils.getNowDate());
        return elevatorGatewayInfoMapper.updateElevatorGatewayInfo(elevatorGatewayInfo);
    }

    /**
     * 批量删除语音网关
     *
     * @param ids 需要删除的语音网关主键
     * @return 结果
     */
    @Override
    public int deleteElevatorGatewayInfoByIds(Long[] ids)
    {
        return elevatorGatewayInfoMapper.deleteElevatorGatewayInfoByIds(ids);
    }

    /**
     * 删除语音网关信息
     *
     * @param id 语音网关主键
     * @return 结果
     */
    @Override
    public int deleteElevatorGatewayInfoById(Long id)
    {
        return elevatorGatewayInfoMapper.deleteElevatorGatewayInfoById(id);
    }
}
