package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TdFileReceiveMapper;
import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.service.ITdFileReceiveService;
import com.ruoyi.common.core.text.Convert;

/**
 * 涉密文件接收Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-14
 */
@Service
public class TdFileReceiveServiceImpl implements ITdFileReceiveService 
{
    @Autowired
    private TdFileReceiveMapper tdFileReceiveMapper;

    /**
     * 查询涉密文件接收
     * 
     * @param receiveId 涉密文件接收主键
     * @return 涉密文件接收
     */
    @Override
    public TdFileReceive selectTdFileReceiveByReceiveId(Long receiveId)
    {
        return tdFileReceiveMapper.selectTdFileReceiveByReceiveId(receiveId);
    }

    @Override
    public List<TdFileReceive> selectTdFileReceiveByFileId(String fileId) {
        return tdFileReceiveMapper.selectTdFileReceiveByFileId(fileId);
    }

    @Override
    public List<TdFileReceive> selectTdFileReceiveByReceiveDepart(String receiveDepart) {
        return tdFileReceiveMapper.selectTdFileReceiveByReceiveDepart(receiveDepart);
    }

    /**
     * 查询涉密文件接收列表
     * 
     * @param tdFileReceive 涉密文件接收
     * @return 涉密文件接收
     */
    @Override
    public List<TdFileReceive> selectTdFileReceiveList(TdFileReceive tdFileReceive)
    {
        return tdFileReceiveMapper.selectTdFileReceiveList(tdFileReceive);
    }

    /**
     * 新增涉密文件接收
     * 
     * @param tdFileReceive 涉密文件接收
     * @return 结果
     */
    @Override
    public int insertTdFileReceive(TdFileReceive tdFileReceive)
    {
        return tdFileReceiveMapper.insertTdFileReceive(tdFileReceive);
    }

    /**
     * 修改涉密文件接收
     * 
     * @param tdFileReceive 涉密文件接收
     * @return 结果
     */
    @Override
    public int updateTdFileReceive(TdFileReceive tdFileReceive)
    {
        return tdFileReceiveMapper.updateTdFileReceive(tdFileReceive);
    }

    /**
     * 批量删除涉密文件接收
     * 
     * @param receiveIds 需要删除的涉密文件接收主键
     * @return 结果
     */
    @Override
    public int deleteTdFileReceiveByReceiveIds(String receiveIds)
    {
        return tdFileReceiveMapper.deleteTdFileReceiveByReceiveIds(Convert.toStrArray(receiveIds));
    }

    /**
     * 删除涉密文件接收信息
     * 
     * @param receiveId 涉密文件接收主键
     * @return 结果
     */
    @Override
    public int deleteTdFileReceiveByReceiveId(Long receiveId)
    {
        return tdFileReceiveMapper.deleteTdFileReceiveByReceiveId(receiveId);
    }
}
