package com.fs.course.service.impl;

import java.util.Collections;
import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.course.vo.FsUserVideoTagsPVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.course.mapper.FsUserVideoTagsMapper;
import com.fs.course.domain.FsUserVideoTags;
import com.fs.course.service.IFsUserVideoTagsService;

/**
 * 短视频标签Service业务层处理
 *
 * @author fs
 * @date 2024-09-23
 */
@Service
public class FsUserVideoTagsServiceImpl implements IFsUserVideoTagsService
{
    @Autowired
    private FsUserVideoTagsMapper fsUserVideoTagsMapper;

    /**
     * 查询短视频标签
     *
     * @param tagId 短视频标签主键
     * @return 短视频标签
     */
    @Override
    public FsUserVideoTags selectFsUserVideoTagsByTagId(Long tagId)
    {
        return fsUserVideoTagsMapper.selectFsUserVideoTagsByTagId(tagId);
    }

    /**
     * 查询短视频标签列表
     *
     * @param fsUserVideoTags 短视频标签
     * @return 短视频标签
     */
    @Override
    public List<FsUserVideoTags> selectFsUserVideoTagsList(FsUserVideoTags fsUserVideoTags)
    {
        return fsUserVideoTagsMapper.selectFsUserVideoTagsList(fsUserVideoTags);
    }

    /**
     * 新增短视频标签
     *
     * @param fsUserVideoTags 短视频标签
     * @return 结果
     */
    @Override
    public int insertFsUserVideoTags(FsUserVideoTags fsUserVideoTags)
    {
        fsUserVideoTags.setCreateTime(DateUtils.getNowDate());
        return fsUserVideoTagsMapper.insertFsUserVideoTags(fsUserVideoTags);
    }

    /**
     * 修改短视频标签
     *
     * @param fsUserVideoTags 短视频标签
     * @return 结果
     */
    @Override
    public int updateFsUserVideoTags(FsUserVideoTags fsUserVideoTags)
    {
        fsUserVideoTags.setUpdateTime(DateUtils.getNowDate());
        return fsUserVideoTagsMapper.updateFsUserVideoTags(fsUserVideoTags);
    }

    /**
     * 批量删除短视频标签
     *
     * @param tagIds 需要删除的短视频标签主键
     * @return 结果
     */
    @Override
    public int deleteFsUserVideoTagsByTagIds(Long[] tagIds)
    {
        return fsUserVideoTagsMapper.deleteFsUserVideoTagsByTagIds(tagIds);
    }

    /**
     * 删除短视频标签信息
     *
     * @param tagId 短视频标签主键
     * @return 结果
     */
    @Override
    public int deleteFsUserVideoTagsByTagId(Long tagId)
    {
        return fsUserVideoTagsMapper.deleteFsUserVideoTagsByTagId(tagId);
    }

    @Override
    public List<FsUserVideoTagsPVO> selectFsUserVideoTagsSubList() {
        return fsUserVideoTagsMapper.selectFsUserVideoTagsSubList();
    }

    @Override
    public List<FsUserVideoTags> selectTagList() {
        return fsUserVideoTagsMapper.selectTagList();
    }
}
