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.AlarmLogMapper;
import com.ruoyi.base.domain.AlarmLog;
import com.ruoyi.base.service.IAlarmLogService;

/**
 * 安防告警日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2026-05-20
 */
@Service
public class AlarmLogServiceImpl implements IAlarmLogService 
{
    @Autowired
    private AlarmLogMapper alarmLogMapper;

    /**
     * 查询安防告警日志
     * 
     * @param id 安防告警日志主键
     * @return 安防告警日志
     */
    @Override
    public AlarmLog selectAlarmLogById(Long id)
    {
        return alarmLogMapper.selectAlarmLogById(id);
    }

    /**
     * 查询安防告警日志列表
     * 
     * @param alarmLog 安防告警日志
     * @return 安防告警日志
     */
    @Override
    public List<AlarmLog> selectAlarmLogList(AlarmLog alarmLog)
    {
        return alarmLogMapper.selectAlarmLogList(alarmLog);
    }

    /**
     * 新增安防告警日志
     * 
     * @param alarmLog 安防告警日志
     * @return 结果
     */
    @Override
    public int insertAlarmLog(AlarmLog alarmLog)
    {
        alarmLog.setCreateTime(DateUtils.getNowDate());
        return alarmLogMapper.insertAlarmLog(alarmLog);
    }

    /**
     * 修改安防告警日志
     * 
     * @param alarmLog 安防告警日志
     * @return 结果
     */
    @Override
    public int updateAlarmLog(AlarmLog alarmLog)
    {
        return alarmLogMapper.updateAlarmLog(alarmLog);
    }

    /**
     * 批量删除安防告警日志
     * 
     * @param ids 需要删除的安防告警日志主键
     * @return 结果
     */
    @Override
    public int deleteAlarmLogByIds(Long[] ids)
    {
        return alarmLogMapper.deleteAlarmLogByIds(ids);
    }

    /**
     * 删除安防告警日志信息
     * 
     * @param id 安防告警日志主键
     * @return 结果
     */
    @Override
    public int deleteAlarmLogById(Long id)
    {
        return alarmLogMapper.deleteAlarmLogById(id);
    }
}
