package com.ztmap.project.zhny.alarm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztmap.project.zhny.alarm.mapper.TAlarmMapper;
import com.ztmap.project.zhny.alarm.domain.TAlarm;
import com.ztmap.project.zhny.alarm.service.ITAlarmService;
import com.ztmap.common.utils.text.Convert;

/**
 * 告警Service业务层处理
 * 
 * @author ztmap
 * @date 2023-11-16
 */
@Service
public class TAlarmServiceImpl implements ITAlarmService 
{
    @Autowired
    private TAlarmMapper tAlarmMapper;

    /**
     * 查询告警
     * 
     * @param id 告警ID
     * @return 告警
     */
    @Override
    public TAlarm selectTAlarmById(Long id)
    {
        return tAlarmMapper.selectTAlarmById(id);
    }

    /**
     * 查询告警列表
     * 
     * @param tAlarm 告警
     * @return 告警
     */
    @Override
    public List<TAlarm> selectTAlarmList(TAlarm tAlarm)
    {
        return tAlarmMapper.selectTAlarmList(tAlarm);
    }

    /**
     * 新增告警
     * 
     * @param tAlarm 告警
     * @return 结果
     */
    @Override
    public int insertTAlarm(TAlarm tAlarm)
    {
        return tAlarmMapper.insertTAlarm(tAlarm);
    }

    /**
     * 修改告警
     * 
     * @param tAlarm 告警
     * @return 结果
     */
    @Override
    public int updateTAlarm(TAlarm tAlarm)
    {
        return tAlarmMapper.updateTAlarm(tAlarm);
    }

    /**
     * 删除告警对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTAlarmByIds(String ids)
    {
        return tAlarmMapper.deleteTAlarmByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除告警信息
     * 
     * @param id 告警ID
     * @return 结果
     */
    @Override
    public int deleteTAlarmById(Long id)
    {
        return tAlarmMapper.deleteTAlarmById(id);
    }
}
