package com.ruoyi.rocketmq.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.rocketmq.domain.RmInitialMonitorItem;
import com.ruoyi.rocketmq.service.IRmInitialMonitorItemService;
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-09-10
 */
@RestController
@RequestMapping("/initialMonitorItem")
public class RmInitialMonitorItemController extends BaseController
{
    @Autowired
    private IRmInitialMonitorItemService rmInitialMonitorItemService;

    /**
     * 查询监控项列表
     */
    @RequiresPermissions("rocketmq:item:list")
    @PostMapping("/list")
    public AjaxResult list(@RequestBody RmInitialMonitorItem rmInitialMonitorItem)
    {
        Map<String, List<RmInitialMonitorItem>> map = rmInitialMonitorItemService.selectAllMsgList(rmInitialMonitorItem);
        return success(map);
    }


}
