package com.ruoyi.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.VideoInfoMapper;
import com.ruoyi.system.domain.VideoInfo;
import com.ruoyi.system.service.IVideoInfoService;

/**
 * 视频设备Service业务层处理
 *
 * @author ruoyi
 * @date 2024-07-15
 */
@Service
public class VideoInfoServiceImpl implements IVideoInfoService {
    @Autowired
    private VideoInfoMapper videoInfoMapper;

    /**
     * 查询视频设备
     *
     * @param id 视频设备主键
     * @return 视频设备
     */
    @Override
    public VideoInfo selectVideoInfoById(Long id) {
        return videoInfoMapper.selectVideoInfoById(id);
    }

    /**
     * 查询视频设备列表
     *
     * @param videoInfo 视频设备
     * @return 视频设备
     */
    @Override
    public List<VideoInfo> selectVideoInfoList(VideoInfo videoInfo) {
        return videoInfoMapper.selectVideoInfoList(videoInfo);
    }

    /**
     * 新增视频设备
     *
     * @param videoInfo 视频设备
     * @return 结果
     */
    @Override
    public int insertVideoInfo(VideoInfo videoInfo) {
        return videoInfoMapper.insertVideoInfo(videoInfo);
    }

    /**
     * 修改视频设备
     *
     * @param videoInfo 视频设备
     * @return 结果
     */
    @Override
    public int updateVideoInfo(VideoInfo videoInfo) {
        return videoInfoMapper.updateVideoInfo(videoInfo);
    }

    /**
     * 批量删除视频设备
     *
     * @param ids 需要删除的视频设备主键
     * @return 结果
     */
    @Override
    public int deleteVideoInfoByIds(Long[] ids) {
        return videoInfoMapper.deleteVideoInfoByIds(ids);
    }


    /**
     * 查询视频设备
     *
     * @param sn
     * @return
     */
    @Override
    public VideoInfo selectGatewayByCondition(String sn) {
        return videoInfoMapper.selectGatewayByCondition(sn);
    }

    /**
     * 查询视频设备
     *
     * @param gateway
     * @param condition
     * @return
     */
    @Override
    public VideoInfo selectVideoByCondition(String gateway, String condition) {
        return videoInfoMapper.selectVideoByCondition(gateway, condition);
    }

    @Override
    public List<VideoInfo> findVideoInfoByGateway(String matchedPart) {
        return videoInfoMapper.findVideoInfoByGateway(matchedPart);
    }

    /**
     * 查询视频设备
     *
     * @param videoInfo
     * @return
     */
    @Override
    public VideoInfo findVideoInfo(VideoInfo videoInfo) {
        return videoInfoMapper.findVideoInfo(videoInfo);
    }

    /**
     * 删除视频设备信息
     *
     * @param id 视频设备主键
     * @return 结果
     */
    @Override
    public int deleteVideoInfoById(Long id) {
        return videoInfoMapper.deleteVideoInfoById(id);
    }
}
