package com.fs.delivery.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.delivery.mapper.CtLongVideoMapper;
import com.fs.delivery.domain.CtLongVideo;
import com.fs.delivery.service.ICtLongVideoService;

/**
 * 长视频Service业务层处理
 * 
 * @author fs
 * @date 2026-01-22
 */
@Service
public class CtLongVideoServiceImpl implements ICtLongVideoService 
{
    @Autowired
    private CtLongVideoMapper ctLongVideoMapper;

    /**
     * 查询长视频
     * 
     * @param id 长视频主键
     * @return 长视频
     */
    @Override
    public CtLongVideo selectCtLongVideoById(Long id)
    {
        return ctLongVideoMapper.selectCtLongVideoById(id);
    }

    /**
     * 查询长视频列表
     * 
     * @param ctLongVideo 长视频
     * @return 长视频
     */
    @Override
    public List<CtLongVideo> selectCtLongVideoList(CtLongVideo ctLongVideo)
    {
        return ctLongVideoMapper.selectCtLongVideoList(ctLongVideo);
    }

    /**
     * 新增长视频
     * 
     * @param ctLongVideo 长视频
     * @return 结果
     */
    @Override
    public int insertCtLongVideo(CtLongVideo ctLongVideo)
    {
        ctLongVideo.setCreateTime(DateUtils.getNowDate());
        return ctLongVideoMapper.insertCtLongVideo(ctLongVideo);
    }

    /**
     * 修改长视频
     * 
     * @param ctLongVideo 长视频
     * @return 结果
     */
    @Override
    public int updateCtLongVideo(CtLongVideo ctLongVideo)
    {
        ctLongVideo.setUpdateTime(DateUtils.getNowDate());
        return ctLongVideoMapper.updateCtLongVideo(ctLongVideo);
    }

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

    /**
     * 删除长视频信息
     * 
     * @param id 长视频主键
     * @return 结果
     */
    @Override
    public int deleteCtLongVideoById(Long id)
    {
        return ctLongVideoMapper.deleteCtLongVideoById(id);
    }
}
