package com.ruoyi.ems.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.mapper.AdmOpAlarmPolicyMapper;
import com.ruoyi.ems.domain.AdmOpAlarmPolicy;
import com.ruoyi.ems.service.IAdmOpAlarmPolicyService;

/**
 * 能源设施告警策略Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-26
 */
@Service
public class AdmOpAlarmPolicyServiceImpl implements IAdmOpAlarmPolicyService 
{
    @Autowired
    private AdmOpAlarmPolicyMapper admOpAlarmPolicyMapper;

    /**
     * 查询能源设施告警策略
     * 
     * @param id 能源设施告警策略主键
     * @return 能源设施告警策略
     */
    @Override
    public AdmOpAlarmPolicy selectAdmOpAlarmPolicyById(Long id)
    {
        return admOpAlarmPolicyMapper.selectAdmOpAlarmPolicyById(id);
    }

    /**
     * 查询能源设施告警策略列表
     * 
     * @param admOpAlarmPolicy 能源设施告警策略
     * @return 能源设施告警策略
     */
    @Override
    public List<AdmOpAlarmPolicy> selectAdmOpAlarmPolicyList(AdmOpAlarmPolicy admOpAlarmPolicy)
    {
        return admOpAlarmPolicyMapper.selectAdmOpAlarmPolicyList(admOpAlarmPolicy);
    }

    /**
     * 新增能源设施告警策略
     * 
     * @param admOpAlarmPolicy 能源设施告警策略
     * @return 结果
     */
    @Override
    public int insertAdmOpAlarmPolicy(AdmOpAlarmPolicy admOpAlarmPolicy)
    {
        return admOpAlarmPolicyMapper.insertAdmOpAlarmPolicy(admOpAlarmPolicy);
    }

    /**
     * 修改能源设施告警策略
     * 
     * @param admOpAlarmPolicy 能源设施告警策略
     * @return 结果
     */
    @Override
    public int updateAdmOpAlarmPolicy(AdmOpAlarmPolicy admOpAlarmPolicy)
    {
        return admOpAlarmPolicyMapper.updateAdmOpAlarmPolicy(admOpAlarmPolicy);
    }

    /**
     * 批量删除能源设施告警策略
     * 
     * @param ids 需要删除的能源设施告警策略主键
     * @return 结果
     */
    @Override
    public int deleteAdmOpAlarmPolicyByIds(Long[] ids)
    {
        return admOpAlarmPolicyMapper.deleteAdmOpAlarmPolicyByIds(ids);
    }

    /**
     * 删除能源设施告警策略信息
     * 
     * @param id 能源设施告警策略主键
     * @return 结果
     */
    @Override
    public int deleteAdmOpAlarmPolicyById(Long id)
    {
        return admOpAlarmPolicyMapper.deleteAdmOpAlarmPolicyById(id);
    }
}
