package com.ruoyi.asset.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.asset.mapper.TbAssetBorrowRecordMapper;
import com.ruoyi.asset.domain.TbAssetBorrowRecord;
import com.ruoyi.asset.service.ITbAssetBorrowRecordService;

/**
 * 设备借用记录Service业务层处理
 * 
 * @author 原动力
 * @date 2023-03-27
 */
@Service
public class TbAssetBorrowRecordServiceImpl extends ServiceImpl<TbAssetBorrowRecordMapper, TbAssetBorrowRecord> implements ITbAssetBorrowRecordService
{
    @Autowired
    private TbAssetBorrowRecordMapper tbAssetBorrowRecordMapper;

    /**
     * 查询设备借用记录
     * 
     * @param id 设备借用记录主键
     * @return 设备借用记录
     */
    @Override
    public TbAssetBorrowRecord selectTbAssetBorrowRecordById(Long id)
    {
        return tbAssetBorrowRecordMapper.selectTbAssetBorrowRecordById(id);
    }

    /**
     * 查询设备借用记录列表
     * 
     * @param tbAssetBorrowRecord 设备借用记录
     * @return 设备借用记录
     */
    @Override
    public List<TbAssetBorrowRecord> selectTbAssetBorrowRecordList(TbAssetBorrowRecord tbAssetBorrowRecord)
    {
        return tbAssetBorrowRecordMapper.selectTbAssetBorrowRecordList(tbAssetBorrowRecord);
    }

    /**
     * 新增设备借用记录
     * 
     * @param tbAssetBorrowRecord 设备借用记录
     * @return 结果
     */
    @Override
    public int insertTbAssetBorrowRecord(TbAssetBorrowRecord tbAssetBorrowRecord)
    {
        return tbAssetBorrowRecordMapper.insertTbAssetBorrowRecord(tbAssetBorrowRecord);
    }

    /**
     * 修改设备借用记录
     * 
     * @param tbAssetBorrowRecord 设备借用记录
     * @return 结果
     */
    @Override
    public int updateTbAssetBorrowRecord(TbAssetBorrowRecord tbAssetBorrowRecord)
    {
        return tbAssetBorrowRecordMapper.updateTbAssetBorrowRecord(tbAssetBorrowRecord);
    }

    /**
     * 批量删除设备借用记录
     * 
     * @param ids 需要删除的设备借用记录主键
     * @return 结果
     */
    @Override
    public int deleteTbAssetBorrowRecordByIds(Long[] ids)
    {
        return tbAssetBorrowRecordMapper.deleteTbAssetBorrowRecordByIds(ids);
    }

    /**
     * 删除设备借用记录信息
     * 
     * @param id 设备借用记录主键
     * @return 结果
     */
    @Override
    public int deleteTbAssetBorrowRecordById(Long id)
    {
        return tbAssetBorrowRecordMapper.deleteTbAssetBorrowRecordById(id);
    }
}
