package com.ruoyi.ss.record.time.service.impl;

import com.ruoyi.ss.record.time.domain.RecordTime;
import com.ruoyi.ss.record.time.domain.RecordTimeQuery;
import com.ruoyi.ss.record.time.domain.RecordTimeVO;
import com.ruoyi.ss.record.time.mapper.RecordTimeMapper;
import com.ruoyi.ss.record.time.service.IRecordTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备时长变化记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-06
 */
@Service
public class RecordTimeServiceImpl implements IRecordTimeService
{
    @Autowired
    private RecordTimeMapper recordTimeMapper;

    /**
     * 查询设备时长变化记录
     *
     * @param id 设备时长变化记录主键
     * @return 设备时长变化记录
     */
    @Override
    public RecordTimeVO selectRecordTimeById(Long id)
    {
        return recordTimeMapper.selectRecordTimeById(id);
    }

    /**
     * 查询设备时长变化记录列表
     *
     * @param recordTime 设备时长变化记录
     * @return 设备时长变化记录
     */
    @Override
    public List<RecordTimeVO> selectRecordTimeList(RecordTimeQuery recordTime)
    {
        return recordTimeMapper.selectRecordTimeList(recordTime);
    }

    /**
     * 新增设备时长变化记录
     *
     * @param recordTime 设备时长变化记录
     * @return 结果
     */
    @Override
    public int insertRecordTime(RecordTime recordTime)
    {
        return recordTimeMapper.insertRecordTime(recordTime);
    }

    /**
     * 修改设备时长变化记录
     *
     * @param recordTime 设备时长变化记录
     * @return 结果
     */
    @Override
    public int updateRecordTime(RecordTime recordTime)
    {
        return recordTimeMapper.updateRecordTime(recordTime);
    }

    /**
     * 批量删除设备时长变化记录
     *
     * @param ids 需要删除的设备时长变化记录主键
     * @return 结果
     */
    @Override
    public int deleteRecordTimeByIds(Long[] ids)
    {
        return recordTimeMapper.deleteRecordTimeByIds(ids);
    }

    /**
     * 删除设备时长变化记录信息
     *
     * @param id 设备时长变化记录主键
     * @return 结果
     */
    @Override
    public int deleteRecordTimeById(Long id)
    {
        return recordTimeMapper.deleteRecordTimeById(id);
    }
}
