package com.zd.alg.alarm.service.impl;

import com.zd.alg.alarm.domain.AlarmLog;
import com.zd.alg.alarm.mapper.AlarmLogMapper;
import com.zd.alg.alarm.service.IAlarmLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 电话报警推送日志Service业务层处理
 *
 * @author liubo
 * @date 2021-11-11
 */
@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) {
        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);
    }

    @Override
    public List<AlarmLog> selectNoBackAlarmLogList(Map<String, Object> params) {
        return alarmLogMapper.selectNoBackAlarmLogList(params);
    }
}
