package com.tongran.system.controller;

import com.tongran.common.core.web.controller.BaseController;
import com.tongran.common.core.web.domain.AjaxResult;
import com.tongran.common.security.annotation.RequiresPermissions;
import com.tongran.system.domain.RmMonitorConfigDetails;
import com.tongran.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 tongran
 * @date 2025-11-14
 */
@RestController
@RequestMapping("/monitorConfigDetails")
@RequiresPermissions("system:monitorConfig")
public class RmMonitorConfigDetailsController extends BaseController
{
    @Autowired
    private IRmMonitorConfigDetailsService rmMonitorConfigDetailsService;

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