package com.ruoyi.abuwx.service.impl;

import com.ruoyi.abuwx.domain.VideoOperationRecord;
import com.ruoyi.abuwx.mapper.VideoOperationRecordMapper;
import com.ruoyi.abuwx.service.IVideoOperationRecordService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 视频管理操作记录Service业务层处理
 * 
 * @author lujie
 * @date 2025-01-10
 */
@Service
public class VideoOperationRecordServiceImpl implements IVideoOperationRecordService 
{
    @Autowired
    private VideoOperationRecordMapper videoOperationRecordMapper;

    /**
     * 查询视频管理操作记录
     * 
     * @param id 视频管理操作记录主键
     * @return 视频管理操作记录
     */
    @Override
    public VideoOperationRecord selectVideoOperationRecordById(Long id)
    {
        return videoOperationRecordMapper.selectVideoOperationRecordById(id);
    }

    /**
     * 查询视频管理操作记录列表
     * 
     * @param videoOperationRecord 视频管理操作记录
     * @return 视频管理操作记录
     */
    @Override
    public List<VideoOperationRecord> selectVideoOperationRecordList(VideoOperationRecord videoOperationRecord)
    {
        return videoOperationRecordMapper.selectVideoOperationRecordList(videoOperationRecord);
    }

    /**
     * 新增视频管理操作记录
     * 
     * @param videoOperationRecord 视频管理操作记录
     * @return 结果
     */
    @Override
    public int insertVideoOperationRecord(VideoOperationRecord videoOperationRecord)
    {
        videoOperationRecord.setCreateTime(DateUtils.getNowDate());
        return videoOperationRecordMapper.insertVideoOperationRecord(videoOperationRecord);
    }

    /**
     * 修改视频管理操作记录
     * 
     * @param videoOperationRecord 视频管理操作记录
     * @return 结果
     */
    @Override
    public int updateVideoOperationRecord(VideoOperationRecord videoOperationRecord)
    {
        videoOperationRecord.setUpdateTime(DateUtils.getNowDate());
        return videoOperationRecordMapper.updateVideoOperationRecord(videoOperationRecord);
    }

    /**
     * 批量删除视频管理操作记录
     * 
     * @param ids 需要删除的视频管理操作记录主键
     * @return 结果
     */
    @Override
    public int deleteVideoOperationRecordByIds(Long[] ids)
    {
        return videoOperationRecordMapper.deleteVideoOperationRecordByIds(ids);
    }

    /**
     * 删除视频管理操作记录信息
     * 
     * @param id 视频管理操作记录主键
     * @return 结果
     */
    @Override
    public int deleteVideoOperationRecordById(Long id)
    {
        return videoOperationRecordMapper.deleteVideoOperationRecordById(id);
    }
}
