package com.zcloud.service.bus.impl;

import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.corp.MaintenanceManagementMapper;
import com.zcloud.service.bus.MaintenanceManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明：企业运维管理
 * 作者：limingyu
 * 时间：2023-07-19
 */
@Service
@Transactional //开启事物
public class MaintenanceManagementServiceImpl implements MaintenanceManagementService {
    @Autowired
    private MaintenanceManagementMapper maintenanceManagementMapper;

    /**
     * 运维管理-维护提交
     * @return
     * @throws Exception
     */
    @Override
    public void save(PageData maintenanceInfo) throws Exception {
        maintenanceManagementMapper.save(maintenanceInfo);
    }

    /**
     * 运维管理-停用提交
     * @return
     * @throws Exception
     */
    @Override
    public void update(PageData pd) throws Exception {
        maintenanceManagementMapper.update(pd);
    }

    @Override
    public void updateEnable(PageData pd) throws Exception {
        maintenanceManagementMapper.updateEnable(pd);
    }

    /**
     * 获取当前企业维护记录
     * @return
     * @throws Exception
     */
    @Override
    public List<PageData> getMaintenanceLogList(PageData pd) {
        return maintenanceManagementMapper.getMaintenanceLogList(pd);
    }

}
