package com.ruoyi.mall.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.MallCameraVideoMapper;
import com.ruoyi.mall.domain.MallCameraVideo;
import com.ruoyi.mall.service.IMallCameraVideoService;

import javax.annotation.Resource;

/**
 * 摄像头视频Service业务层处理
 *
 * @author LCL
 * @date 2024-03-29
 */
@Service
public class MallCameraVideoServiceImpl implements IMallCameraVideoService
{
    @Resource
    private MallCameraVideoMapper mallCameraVideoMapper;

    /**
     * 查询摄像头视频
     *
     * @param cameraVideoId 摄像头视频主键
     * @return 摄像头视频
     */
    @Override
    public MallCameraVideo selectMallCameraVideoByCameraVideoId(Long cameraVideoId)
    {
        return mallCameraVideoMapper.selectMallCameraVideoByCameraVideoId(cameraVideoId);
    }

    /**
     * 查询摄像头视频列表
     *
     * @param mallCameraVideo 摄像头视频
     * @return 摄像头视频
     */
    @Override
    public List<MallCameraVideo> selectMallCameraVideoList(MallCameraVideo mallCameraVideo)
    {
        return mallCameraVideoMapper.selectMallCameraVideoList(mallCameraVideo);
    }

    /**
     * 新增摄像头视频
     *
     * @param mallCameraVideo 摄像头视频
     * @return 结果
     */
    @Override
    public int insertMallCameraVideo(MallCameraVideo mallCameraVideo)
    {
        return mallCameraVideoMapper.insertMallCameraVideo(mallCameraVideo);
    }

    /**
     * 修改摄像头视频
     *
     * @param mallCameraVideo 摄像头视频
     * @return 结果
     */
    @Override
    public int updateMallCameraVideo(MallCameraVideo mallCameraVideo)
    {
        return mallCameraVideoMapper.updateMallCameraVideo(mallCameraVideo);
    }

    /**
     * 批量删除摄像头视频
     *
     * @param cameraVideoIds 需要删除的摄像头视频主键
     * @return 结果
     */
    @Override
    public int deleteMallCameraVideoByCameraVideoIds(Long[] cameraVideoIds)
    {
        return mallCameraVideoMapper.deleteMallCameraVideoByCameraVideoIds(cameraVideoIds);
    }

    /**
     * 删除摄像头视频信息
     *
     * @param cameraVideoId 摄像头视频主键
     * @return 结果
     */
    @Override
    public int deleteMallCameraVideoByCameraVideoId(Long cameraVideoId)
    {
        return mallCameraVideoMapper.deleteMallCameraVideoByCameraVideoId(cameraVideoId);
    }

    /**
     * APP查询远程回放视频列表
     *
     * @param params 参数
     * @return 基站集合
     */
    @Override
    public List<Map<String, Object>> selectAppRemotePlayBackVideoListList(Map<String, Object> params) {
        return mallCameraVideoMapper.selectAppRemotePlayBackVideoListList(params);
    }
}
