package com.phm.manage.service.impl;

import com.phm.manage.domain.PerformanceMonitorModel;
import com.phm.manage.mapper.PerformanceMonitorModelMapper;
import com.phm.manage.service.IPerformanceMonitorModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 性能监测模型信息Service业务层处理
 *
 * @author phm
 * @date 2023-08-22
 */
@Service
public class PerformanceMonitorModelServiceImpl implements IPerformanceMonitorModelService {
    @Autowired
    private PerformanceMonitorModelMapper performanceMonitorModelMapper;

    /**
     * 查询性能监测模型信息
     *
     * @param id 性能监测模型信息主键
     * @return 性能监测模型信息
     */
    @Override
    public PerformanceMonitorModel selectPerformanceMonitorModelById(Long id) {
        return performanceMonitorModelMapper.selectPerformanceMonitorModelById(id);
    }

    /**
     * 查询性能监测模型信息列表
     *
     * @param performanceMonitorModel 性能监测模型信息
     * @return 性能监测模型信息
     */
    @Override
    public List<PerformanceMonitorModel> selectPerformanceMonitorModelList(PerformanceMonitorModel performanceMonitorModel) {
        return performanceMonitorModelMapper.selectPerformanceMonitorModelList(performanceMonitorModel);
    }

    /**
     * 新增性能监测模型信息
     *
     * @param performanceMonitorModel 性能监测模型信息
     * @return 结果
     */
    @Override
    public int insertPerformanceMonitorModel(PerformanceMonitorModel performanceMonitorModel) {
        return performanceMonitorModelMapper.insertPerformanceMonitorModel(performanceMonitorModel);
    }

    /**
     * 修改性能监测模型信息
     *
     * @param performanceMonitorModel 性能监测模型信息
     * @return 结果
     */
    @Override
    public int updatePerformanceMonitorModel(PerformanceMonitorModel performanceMonitorModel) {
        return performanceMonitorModelMapper.updatePerformanceMonitorModel(performanceMonitorModel);
    }

    /**
     * 批量删除性能监测模型信息
     *
     * @param ids 需要删除的性能监测模型信息主键
     * @return 结果
     */
    @Override
    public int deletePerformanceMonitorModelByIds(Long[] ids) {
        return performanceMonitorModelMapper.deletePerformanceMonitorModelByIds(ids);
    }

    /**
     * 删除性能监测模型信息信息
     *
     * @param id 性能监测模型信息主键
     * @return 结果
     */
    @Override
    public int deletePerformanceMonitorModelById(Long id) {
        return performanceMonitorModelMapper.deletePerformanceMonitorModelById(id);
    }
}
