package com.huashe.park.core.service.impl;

import java.util.List;

import com.huashe.common.annotation.DataSource;
import com.huashe.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huashe.park.core.mapper.BdCameraInfoMapper;
import com.huashe.park.core.service.IBdCameraInfoService;
import com.huashe.park.domain.dto.VideoFence;
import com.huashe.park.domain.entity.BdCameraInfo;

/**
 * 视频设备Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-21
 */
@Service
@DataSource(DataSourceType.PKB)
public class BdCameraInfoServiceImpl implements IBdCameraInfoService {
    @Autowired
    private BdCameraInfoMapper bdCameraInfoMapper;

    /**
     * 查询视频设备
     * 
     * @param id 视频设备主键
     * @return 视频设备
     */
    @Override
    public BdCameraInfo selectBdCameraInfoById(Long id) {
        return bdCameraInfoMapper.selectBdCameraInfoById(id);
    }

    /**
     * 查询视频设备列表
     * 
     * @param bdCameraInfo 视频设备
     * @return 视频设备
     */
    @Override
    public List<BdCameraInfo> selectBdCameraInfoList(BdCameraInfo bdCameraInfo) {
        return bdCameraInfoMapper.selectBdCameraInfoList(bdCameraInfo);
    }

    /**
     * 新增视频设备
     * 
     * @param bdCameraInfo 视频设备
     * @return 结果
     */
    @Override
    public int insertBdCameraInfo(BdCameraInfo bdCameraInfo) {
        return bdCameraInfoMapper.insertBdCameraInfo(bdCameraInfo);
    }

    /**
     * 修改视频设备
     * 
     * @param bdCameraInfo 视频设备
     * @return 结果
     */
    @Override
    public int updateBdCameraInfo(BdCameraInfo bdCameraInfo) {
        return bdCameraInfoMapper.updateBdCameraInfo(bdCameraInfo);
    }

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

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

    @Override
    public List<VideoFence> selectBdCameraFence() {
        return bdCameraInfoMapper.selectBdCameraFence();
    }
}
