package com.ruoyi.base.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.base.mapper.RobotOpsAppointmentRecordMapper;
import com.ruoyi.base.domain.RobotOpsAppointmentRecord;
import com.ruoyi.base.service.IRobotOpsAppointmentRecordService;

/**
 * 访客预约记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2026-04-28
 */
@Service
public class RobotOpsAppointmentRecordServiceImpl implements IRobotOpsAppointmentRecordService 
{
    @Autowired
    private RobotOpsAppointmentRecordMapper robotOpsAppointmentRecordMapper;

    /**
     * 查询访客预约记录
     * 
     * @param id 访客预约记录主键
     * @return 访客预约记录
     */
    @Override
    public RobotOpsAppointmentRecord selectRobotOpsAppointmentRecordById(Long id)
    {
        return robotOpsAppointmentRecordMapper.selectRobotOpsAppointmentRecordById(id);
    }

    /**
     * 查询访客预约记录列表
     * 
     * @param robotOpsAppointmentRecord 访客预约记录
     * @return 访客预约记录
     */
    @Override
    public List<RobotOpsAppointmentRecord> selectRobotOpsAppointmentRecordList(RobotOpsAppointmentRecord robotOpsAppointmentRecord)
    {
        return robotOpsAppointmentRecordMapper.selectRobotOpsAppointmentRecordList(robotOpsAppointmentRecord);
    }

    /**
     * 新增访客预约记录
     * 
     * @param robotOpsAppointmentRecord 访客预约记录
     * @return 结果
     */
    @Override
    public int insertRobotOpsAppointmentRecord(RobotOpsAppointmentRecord robotOpsAppointmentRecord)
    {
        robotOpsAppointmentRecord.setCreateTime(DateUtils.getNowDate());
        return robotOpsAppointmentRecordMapper.insertRobotOpsAppointmentRecord(robotOpsAppointmentRecord);
    }

    /**
     * 修改访客预约记录
     * 
     * @param robotOpsAppointmentRecord 访客预约记录
     * @return 结果
     */
    @Override
    public int updateRobotOpsAppointmentRecord(RobotOpsAppointmentRecord robotOpsAppointmentRecord)
    {
        robotOpsAppointmentRecord.setUpdateTime(DateUtils.getNowDate());
        return robotOpsAppointmentRecordMapper.updateRobotOpsAppointmentRecord(robotOpsAppointmentRecord);
    }

    /**
     * 批量删除访客预约记录
     * 
     * @param ids 需要删除的访客预约记录主键
     * @return 结果
     */
    @Override
    public int deleteRobotOpsAppointmentRecordByIds(Long[] ids)
    {
        return robotOpsAppointmentRecordMapper.deleteRobotOpsAppointmentRecordByIds(ids);
    }

    /**
     * 删除访客预约记录信息
     * 
     * @param id 访客预约记录主键
     * @return 结果
     */
    @Override
    public int deleteRobotOpsAppointmentRecordById(Long id)
    {
        return robotOpsAppointmentRecordMapper.deleteRobotOpsAppointmentRecordById(id);
    }
}
