package com.ruoyi.system.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.system.domain.RmMonitorConfigDetails;
import com.ruoyi.system.service.IRmMonitorConfigDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 监控看板详情Controller
 * 
 * @author gyt
 * @date 2025-11-14
 */
@RestController
@RequestMapping("/monitorConfigDetails")
public class RmMonitorConfigDetailsController extends BaseController
{
    @Autowired
    private IRmMonitorConfigDetailsService rmMonitorConfigDetailsService;

    /**
     * 监控看板-详情视图 出入流量
     */
    @RequiresPermissions("system:bandwidth:list")
    @PostMapping("/getTrafficByMonitorView")
    public AjaxResult getTrafficByMonitorView(@RequestBody RmMonitorConfigDetails queryParam)
    {
        List<Map<String, Object>> echartsData = rmMonitorConfigDetailsService.getTrafficByMonitorView(queryParam);
        return success(echartsData);
    }
}
