package com.fs.fastGpt.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.fastGpt.domain.FastgptTagGroup;
import com.fs.fastGpt.mapper.FastgptTagGroupMapper;
import com.fs.fastGpt.service.IFastgptTagGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ai标签组Service业务层处理
 *
 * @author fs
 * @date 2024-12-20
 */
@Service
public class FastgptTagGroupServiceImpl implements IFastgptTagGroupService
{
    @Autowired
    private FastgptTagGroupMapper fastgptTagGroupMapper;

    /**
     * 查询ai标签组
     *
     * @param id ai标签组主键
     * @return ai标签组
     */
    @Override
    public FastgptTagGroup selectFastgptTagGroupById(Long id)
    {
        return fastgptTagGroupMapper.selectFastgptTagGroupById(id);
    }

    /**
     * 查询ai标签组列表
     *
     * @param fastgptTagGroup ai标签组
     * @return ai标签组
     */
    @Override
    public List<FastgptTagGroup> selectFastgptTagGroupList(FastgptTagGroup fastgptTagGroup)
    {
        return fastgptTagGroupMapper.selectFastgptTagGroupList(fastgptTagGroup);
    }

    /**
     * 新增ai标签组
     *
     * @param fastgptTagGroup ai标签组
     * @return 结果
     */
    @Override
    public int insertFastgptTagGroup(FastgptTagGroup fastgptTagGroup)
    {
        fastgptTagGroup.setCreateTime(DateUtils.getNowDate());
        return fastgptTagGroupMapper.insertFastgptTagGroup(fastgptTagGroup);
    }

    /**
     * 修改ai标签组
     *
     * @param fastgptTagGroup ai标签组
     * @return 结果
     */
    @Override
    public int updateFastgptTagGroup(FastgptTagGroup fastgptTagGroup)
    {
        fastgptTagGroup.setUpdateTime(DateUtils.getNowDate());
        return fastgptTagGroupMapper.updateFastgptTagGroup(fastgptTagGroup);
    }

    /**
     * 批量删除ai标签组
     *
     * @param ids 需要删除的ai标签组主键
     * @return 结果
     */
    @Override
    public int deleteFastgptTagGroupByIds(Long[] ids)
    {
        return fastgptTagGroupMapper.deleteFastgptTagGroupByIds(ids);
    }

    /**
     * 删除ai标签组信息
     *
     * @param id ai标签组主键
     * @return 结果
     */
    @Override
    public int deleteFastgptTagGroupById(Long id)
    {
        return fastgptTagGroupMapper.deleteFastgptTagGroupById(id);
    }
}
