package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CpsFileReviewInfoMapper;
import com.ruoyi.system.domain.CpsFileReviewInfo;
import com.ruoyi.system.service.ICpsFileReviewInfoService;

/**
 * cps_file_review_info预览文件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CpsFileReviewInfoServiceImpl implements ICpsFileReviewInfoService 
{
    @Autowired
    private CpsFileReviewInfoMapper cpsFileReviewInfoMapper;

    /**
     * 查询cps_file_review_info预览文件
     * 
     * @param id cps_file_review_info预览文件主键
     * @return cps_file_review_info预览文件
     */
    @Override
    public CpsFileReviewInfo selectCpsFileReviewInfoById(Long id)
    {
        return cpsFileReviewInfoMapper.selectCpsFileReviewInfoById(id);
    }

    /**
     * 查询cps_file_review_info预览文件列表
     * 
     * @param cpsFileReviewInfo cps_file_review_info预览文件
     * @return cps_file_review_info预览文件
     */
    @Override
    public List<CpsFileReviewInfo> selectCpsFileReviewInfoList(CpsFileReviewInfo cpsFileReviewInfo)
    {
        return cpsFileReviewInfoMapper.selectCpsFileReviewInfoList(cpsFileReviewInfo);
    }

    /**
     * 新增cps_file_review_info预览文件
     * 
     * @param cpsFileReviewInfo cps_file_review_info预览文件
     * @return 结果
     */
    @Override
    public int insertCpsFileReviewInfo(CpsFileReviewInfo cpsFileReviewInfo)
    {
        cpsFileReviewInfo.setCreateTime(DateUtils.getNowDate());
        return cpsFileReviewInfoMapper.insertCpsFileReviewInfo(cpsFileReviewInfo);
    }

    /**
     * 修改cps_file_review_info预览文件
     * 
     * @param cpsFileReviewInfo cps_file_review_info预览文件
     * @return 结果
     */
    @Override
    public int updateCpsFileReviewInfo(CpsFileReviewInfo cpsFileReviewInfo)
    {
        cpsFileReviewInfo.setUpdateTime(DateUtils.getNowDate());
        return cpsFileReviewInfoMapper.updateCpsFileReviewInfo(cpsFileReviewInfo);
    }

    /**
     * 批量删除cps_file_review_info预览文件
     * 
     * @param ids 需要删除的cps_file_review_info预览文件主键
     * @return 结果
     */
    @Override
    public int deleteCpsFileReviewInfoByIds(Long[] ids)
    {
        return cpsFileReviewInfoMapper.deleteCpsFileReviewInfoByIds(ids);
    }

    /**
     * 删除cps_file_review_info预览文件信息
     * 
     * @param id cps_file_review_info预览文件主键
     * @return 结果
     */
    @Override
    public int deleteCpsFileReviewInfoById(Long id)
    {
        return cpsFileReviewInfoMapper.deleteCpsFileReviewInfoById(id);
    }
}
