package com.ruoyi.system.service.guarantee.impl;


import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.guarantee.GuaranteeInfoFj;
import com.ruoyi.system.service.guarantee.IGuaranteeInfoFjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GuaranteeInfoFjMapper;

import java.util.List;


/**
 * 反担保基础信息附件Service业务层处理
 * 
 * @author boman
 * @date 2024-08-01
 */
@Service
public class GuaranteeInfoFjServiceImpl implements IGuaranteeInfoFjService
{
    @Autowired
    private GuaranteeInfoFjMapper guaranteeInfoFjMapper;

    /**
     * 查询反担保基础信息附件
     * 
     * @param guaranteeInfoFjId 反担保基础信息附件主键
     * @return 反担保基础信息附件
     */
    @Override
    public GuaranteeInfoFj selectGuaranteeInfoFjByGuaranteeInfoFjId(Long guaranteeInfoFjId)
    {
        return guaranteeInfoFjMapper.selectGuaranteeInfoFjByGuaranteeInfoFjId(guaranteeInfoFjId);
    }

    /**
     * 查询反担保基础信息附件列表
     * 
     * @param guaranteeInfoFj 反担保基础信息附件
     * @return 反担保基础信息附件
     */
    @Override
    public List<GuaranteeInfoFj> selectGuaranteeInfoFjList(GuaranteeInfoFj guaranteeInfoFj)
    {
        return guaranteeInfoFjMapper.selectGuaranteeInfoFjList(guaranteeInfoFj);
    }

    /**
     * 新增反担保基础信息附件
     * 
     * @param guaranteeInfoFj 反担保基础信息附件
     * @return 结果
     */
    @Override
    public int insertGuaranteeInfoFj(GuaranteeInfoFj guaranteeInfoFj)
    {
        guaranteeInfoFj.setCreateTime(DateUtils.getNowDate());
        return guaranteeInfoFjMapper.insertGuaranteeInfoFj(guaranteeInfoFj);
    }

    @Override
    public int batchGuaranteeInfoFj(List<GuaranteeInfoFj> guaranteeInfoFj) {
        return guaranteeInfoFjMapper.batchGuaranteeInfoFj(guaranteeInfoFj);
    }

    /**
     * 修改反担保基础信息附件
     * 
     * @param guaranteeInfoFj 反担保基础信息附件
     * @return 结果
     */
    @Override
    public int updateGuaranteeInfoFj(GuaranteeInfoFj guaranteeInfoFj)
    {
        guaranteeInfoFj.setUpdateTime(DateUtils.getNowDate());
        return guaranteeInfoFjMapper.updateGuaranteeInfoFj(guaranteeInfoFj);
    }

    /**
     * 批量删除反担保基础信息附件
     * 
     * @param guaranteeInfoFjIds 需要删除的反担保基础信息附件主键
     * @return 结果
     */
    @Override
    public int deleteGuaranteeInfoFjByGuaranteeInfoFjIds(Long[] guaranteeInfoFjIds)
    {
        return guaranteeInfoFjMapper.deleteGuaranteeInfoFjByGuaranteeInfoFjIds(guaranteeInfoFjIds);
    }

    /**
     * 删除反担保基础信息附件信息
     * 
     * @param guaranteeInfoFjId 反担保基础信息附件主键
     * @return 结果
     */
    @Override
    public int deleteGuaranteeInfoFjByGuaranteeInfoFjId(Long guaranteeInfoFjId)
    {
        return guaranteeInfoFjMapper.deleteGuaranteeInfoFjByGuaranteeInfoFjId(guaranteeInfoFjId);
    }
}
