package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RmMonitorConfigMapper;
import com.ruoyi.system.domain.RmMonitorConfig;
import com.ruoyi.system.service.IRmMonitorConfigService;

/**
 * 监控配置Service业务层处理
 * 
 * @author gyt
 * @date 2025-11-12
 */
@Service
public class RmMonitorConfigServiceImpl implements IRmMonitorConfigService 
{
    @Autowired
    private RmMonitorConfigMapper rmMonitorConfigMapper;

    /**
     * 查询监控配置
     * 
     * @param id 监控配置主键
     * @return 监控配置
     */
    @Override
    public RmMonitorConfig selectRmMonitorConfigById(Long id)
    {
        return rmMonitorConfigMapper.selectRmMonitorConfigById(id);
    }

    /**
     * 查询监控配置列表
     * 
     * @param rmMonitorConfig 监控配置
     * @return 监控配置
     */
    @Override
    public List<RmMonitorConfig> selectRmMonitorConfigList(RmMonitorConfig rmMonitorConfig)
    {
        return rmMonitorConfigMapper.selectRmMonitorConfigList(rmMonitorConfig);
    }

    /**
     * 新增监控配置
     * 
     * @param rmMonitorConfig 监控配置
     * @return 结果
     */
    @Override
    public int insertRmMonitorConfig(RmMonitorConfig rmMonitorConfig)
    {
        rmMonitorConfig.setCreateTime(DateUtils.getNowDate());
        return rmMonitorConfigMapper.insertRmMonitorConfig(rmMonitorConfig);
    }

    /**
     * 修改监控配置
     * 
     * @param rmMonitorConfig 监控配置
     * @return 结果
     */
    @Override
    public int updateRmMonitorConfig(RmMonitorConfig rmMonitorConfig)
    {
        rmMonitorConfig.setUpdateTime(DateUtils.getNowDate());
        return rmMonitorConfigMapper.updateRmMonitorConfig(rmMonitorConfig);
    }

    /**
     * 批量删除监控配置
     * 
     * @param ids 需要删除的监控配置主键
     * @return 结果
     */
    @Override
    public int deleteRmMonitorConfigByIds(Long[] ids)
    {
        return rmMonitorConfigMapper.deleteRmMonitorConfigByIds(ids);
    }

    /**
     * 删除监控配置信息
     * 
     * @param id 监控配置主键
     * @return 结果
     */
    @Override
    public int deleteRmMonitorConfigById(Long id)
    {
        return rmMonitorConfigMapper.deleteRmMonitorConfigById(id);
    }
}
