package com.ruoyi.common.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.mapper.TCommonFileMapper;
import com.ruoyi.common.domain.TCommonFile;
import com.ruoyi.common.service.ITCommonFileService;

/**
 * 附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCommonFileServiceImpl implements ITCommonFileService 
{
    @Autowired
    private TCommonFileMapper tCommonFileMapper;

    /**
     * 查询附件
     * 
     * @param fileId 附件主键
     * @return 附件
     */
    @Override
    public TCommonFile selectTCommonFileByFileId(Long fileId)
    {
        return tCommonFileMapper.selectTCommonFileByFileId(fileId);
    }

    /**
     * 查询附件列表
     * 
     * @param tCommonFile 附件
     * @return 附件
     */
    @Override
    public List<TCommonFile> selectTCommonFileList(TCommonFile tCommonFile)
    {
        return tCommonFileMapper.selectTCommonFileList(tCommonFile);
    }

    /**
     * 新增附件
     * 
     * @param tCommonFile 附件
     * @return 结果
     */
    @Override
    public int insertTCommonFile(TCommonFile tCommonFile)
    {
        return tCommonFileMapper.insertTCommonFile(tCommonFile);
    }

    /**
     * 修改附件
     * 
     * @param tCommonFile 附件
     * @return 结果
     */
    @Override
    public int updateTCommonFile(TCommonFile tCommonFile)
    {
        return tCommonFileMapper.updateTCommonFile(tCommonFile);
    }

    /**
     * 批量删除附件
     * 
     * @param fileIds 需要删除的附件主键
     * @return 结果
     */
    @Override
    public int deleteTCommonFileByFileIds(Long[] fileIds)
    {
        return tCommonFileMapper.deleteTCommonFileByFileIds(fileIds);
    }

    /**
     * 删除附件信息
     * 
     * @param fileId 附件主键
     * @return 结果
     */
    @Override
    public int deleteTCommonFileByFileId(Long fileId)
    {
        return tCommonFileMapper.deleteTCommonFileByFileId(fileId);
    }
}
