package com.aidex.system.service.impl;

import java.util.List;

import com.aidex.system.mapper.SysAlarmMapper;
import com.aidex.system.service.SysAlarmService;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.BaseEntity;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.system.domain.SysAlarm;
import org.springframework.transaction.annotation.Transactional;

/**
 * 报警信息Service业务层处理
 * @author ChenSir
 * @email 914769835
 * @date 2024-03-17
 */
@Service
@Transactional(readOnly = true)
public class SysAlarmServiceImpl extends BaseServiceImpl<SysAlarmMapper, SysAlarm> implements SysAlarmService {

    private static final Logger log = LoggerFactory.getLogger(SysAlarmServiceImpl.class);

    /**
     * 获取单条数据
     * @param sysAlarm 报警信息
     * @return 报警信息
     */
    @Override
    public SysAlarm get(SysAlarm sysAlarm) {
        SysAlarm dto = super.get(sysAlarm);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 报警信息id
     * @return 报警信息
     */
    @Override
    public SysAlarm get(String id) {
        SysAlarm dto = super.get(id);
        return dto;
    }

    /**
     * 查询报警信息列表
     * @param sysAlarm 报警信息
     * @return 报警信息
     */
    @Override
    public List<SysAlarm> findList(SysAlarm sysAlarm) {
		List<SysAlarm> sysAlarmList = super.findList(sysAlarm);
        return sysAlarmList;
    }

    /**
     * 分页查询报警信息列表
     * @param sysAlarm 报警信息
     * @return 报警信息
     */
    @Override
    public PageInfo<SysAlarm> findPage(SysAlarm sysAlarm) {
		PageInfo<SysAlarm> page = super.findPage(sysAlarm);
        return page;
    }

    /**
     * 保存报警信息
     * @param sysAlarm
     * @return 结果
     */
    @Override
    public boolean save(SysAlarm sysAlarm) {
        return super.save(sysAlarm);
    }

    /**
     * 删除报警信息信息
     * @param sysAlarm
     * @return 结果
     */
    @Override
    public boolean remove(SysAlarm sysAlarm) {
        return super.remove(sysAlarm);
    }

    /**
     * 批量删除报警信息
     * @param ids 需要删除的报警信息ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteSysAlarmByIds(String[] ids) {
        return mapper.deleteSysAlarmByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

}
