package com.ruoyi.traceability.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.traceability.mapper.ProReadrecordMapper;
import com.ruoyi.traceability.domain.ProReadrecord;
import com.ruoyi.traceability.service.IProReadrecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 读取记录Service业务层处理
 * 
 * @author wenjy
 * @date 2022-11-09
 */
@Service
public class ProReadrecordServiceImpl implements IProReadrecordService 
{
    @Autowired
    private ProReadrecordMapper proReadrecordMapper;

    /**
     * 查询读取记录
     * 
     * @param id 读取记录主键
     * @return 读取记录
     */
    @Override
    public ProReadrecord selectProReadrecordById(Long id)
    {
        return proReadrecordMapper.selectProReadrecordById(id);
    }

    /**
     * 查询读取记录列表
     * 
     * @param proReadrecord 读取记录
     * @return 读取记录
     */
    @Override
    public List<ProReadrecord> selectProReadrecordList(ProReadrecord proReadrecord)
    {
        return proReadrecordMapper.selectProReadrecordList(proReadrecord);
    }

    /**
     * 新增读取记录
     * 
     * @param proReadrecord 读取记录
     * @return 结果
     */
    @Override
    public int insertProReadrecord(ProReadrecord proReadrecord)
    {
        return proReadrecordMapper.insertProReadrecord(proReadrecord);
    }

    /**
     * 修改读取记录
     * 
     * @param proReadrecord 读取记录
     * @return 结果
     */
    @Override
    public int updateProReadrecord(ProReadrecord proReadrecord)
    {
        return proReadrecordMapper.updateProReadrecord(proReadrecord);
    }

    /**
     * 批量删除读取记录
     * 
     * @param ids 需要删除的读取记录主键
     * @return 结果
     */
    @Override
    public int deleteProReadrecordByIds(String ids)
    {
        return proReadrecordMapper.deleteProReadrecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除读取记录信息
     * 
     * @param id 读取记录主键
     * @return 结果
     */
    @Override
    public int deleteProReadrecordById(Long id)
    {
        return proReadrecordMapper.deleteProReadrecordById(id);
    }
}
