package com.ruoyi.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcBorrowDetailMapper;
import com.ruoyi.oa.domain.CmcBorrowDetail;
import com.ruoyi.oa.service.ICmcBorrowDetailService;

/**
 * cmc借款明细Service业务层处理
 * 
 * @author cmc
 * @date 2024-04-07
 */
@Service
public class CmcBorrowDetailServiceImpl implements ICmcBorrowDetailService 
{
    @Autowired
    private CmcBorrowDetailMapper cmcBorrowDetailMapper;

    /**
     * 查询cmc借款明细
     * 
     * @param borrowId cmc借款明细主键
     * @return cmc借款明细
     */
    @Override
    public List<CmcBorrowDetail> selectCmcBorrowDetailByBorrowId(String borrowId)
    {
        return cmcBorrowDetailMapper.selectCmcBorrowDetailByBorrowId(borrowId);
    }

    /**
     * 查询cmc借款明细列表
     * 
     * @param cmcBorrowDetail cmc借款明细
     * @return cmc借款明细
     */
    @Override
    public List<CmcBorrowDetail> selectCmcBorrowDetailList(CmcBorrowDetail cmcBorrowDetail)
    {
        return cmcBorrowDetailMapper.selectCmcBorrowDetailList(cmcBorrowDetail);
    }

    /**
     * 新增cmc借款明细
     * 
     * @param cmcBorrowDetail cmc借款明细
     * @return 结果
     */
    @Override
    public int insertCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail)
    {
        return cmcBorrowDetailMapper.insertCmcBorrowDetail(cmcBorrowDetail);
    }

    /**
     * 修改cmc借款明细
     * 
     * @param cmcBorrowDetail cmc借款明细
     * @return 结果
     */
    @Override
    public int updateCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail)
    {
        return cmcBorrowDetailMapper.updateCmcBorrowDetail(cmcBorrowDetail);
    }

    /**
     * 批量删除cmc借款明细
     * 
     * @param borrowIds 需要删除的cmc借款明细主键
     * @return 结果
     */
    @Override
    public int deleteCmcBorrowDetailByBorrowIds(String[] borrowIds)
    {
        return cmcBorrowDetailMapper.deleteCmcBorrowDetailByBorrowIds(borrowIds);
    }

    /**
     * 删除cmc借款明细信息
     * 
     * @param borrowId cmc借款明细主键
     * @return 结果
     */
    @Override
    public int deleteCmcBorrowDetailByBorrowId(String borrowId)
    {
        return cmcBorrowDetailMapper.deleteCmcBorrowDetailByBorrowId(borrowId);
    }

    /**
     * 批量删除cmc借款明细
     *
     * @param borrowIds 需要删除的cmc借款明细主键
     * @return 结果
     */
    @Override
    public int deleteCmcBorrowDetailByBorrowDetailId(String[] borrowDetailId)
    {
        return cmcBorrowDetailMapper.deleteCmcBorrowDetailByBorrowDetailId(borrowDetailId);
    }

}
