package com.aucma.report.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aucma.report.mapper.DeviceAlarmRecordMapper;
import com.aucma.report.domain.DeviceAlarmRecord;
import com.aucma.report.service.IDeviceAlarmRecordService;

/**
 * 设备报警记录Service业务层处理
 *
 * @author Yinq
 * @date 2024-03-26
 */
@Service
public class DeviceAlarmRecordServiceImpl implements IDeviceAlarmRecordService
{
    @Autowired
    private DeviceAlarmRecordMapper deviceAlarmRecordMapper;

    /**
     * 查询设备报警记录
     *
     * @param objId 设备报警记录主键
     * @return 设备报警记录
     */
    @Override
    public DeviceAlarmRecord selectDeviceAlarmRecordByObjId(Long objId)
    {
        return deviceAlarmRecordMapper.selectDeviceAlarmRecordByObjId(objId);
    }

    /**
     * 查询设备报警记录列表
     *
     * @param deviceAlarmRecord 设备报警记录
     * @return 设备报警记录
     */
    @Override
    public List<DeviceAlarmRecord> selectDeviceAlarmRecordList(DeviceAlarmRecord deviceAlarmRecord)
    {
        return deviceAlarmRecordMapper.selectDeviceAlarmRecordList(deviceAlarmRecord);
    }

    /**
     * 新增设备报警记录
     *
     * @param deviceAlarmRecord 设备报警记录
     * @return 结果
     */
    @Override
    public int insertDeviceAlarmRecord(DeviceAlarmRecord deviceAlarmRecord)
    {
        return deviceAlarmRecordMapper.insertDeviceAlarmRecord(deviceAlarmRecord);
    }

    /**
     * 修改设备报警记录
     *
     * @param deviceAlarmRecord 设备报警记录
     * @return 结果
     */
    @Override
    public int updateDeviceAlarmRecord(DeviceAlarmRecord deviceAlarmRecord)
    {
        return deviceAlarmRecordMapper.updateDeviceAlarmRecord(deviceAlarmRecord);
    }

    /**
     * 批量删除设备报警记录
     *
     * @param objIds 需要删除的设备报警记录主键
     * @return 结果
     */
    @Override
    public int deleteDeviceAlarmRecordByObjIds(Long[] objIds)
    {
        return deviceAlarmRecordMapper.deleteDeviceAlarmRecordByObjIds(objIds);
    }

    /**
     * 删除设备报警记录信息
     *
     * @param objId 设备报警记录主键
     * @return 结果
     */
    @Override
    public int deleteDeviceAlarmRecordByObjId(Long objId)
    {
        return deviceAlarmRecordMapper.deleteDeviceAlarmRecordByObjId(objId);
    }

    @Override
    public int deleteDeviceAlarmRecordByDates(Long dates) {
        return deviceAlarmRecordMapper.deleteDeviceAlarmRecordByDates(dates);
    }
}
