2025-08-26 19:14:12 +08:00
|
|
|
package com.ruoyi.rocketmq.controller;
|
|
|
|
|
|
2025-09-04 23:18:08 +08:00
|
|
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
|
|
|
import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
|
|
import com.ruoyi.common.core.web.page.PageDomain;
|
|
|
|
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
2025-08-26 19:14:12 +08:00
|
|
|
import com.ruoyi.common.log.annotation.Log;
|
|
|
|
|
import com.ruoyi.common.log.enums.BusinessType;
|
|
|
|
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
|
|
|
|
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
|
|
|
|
import com.ruoyi.rocketmq.service.IInitialMountPointInfoService;
|
2025-09-04 23:18:08 +08:00
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.util.List;
|
2025-09-17 09:34:00 +08:00
|
|
|
import java.util.Map;
|
2025-08-26 19:14:12 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 挂载点监控信息Controller
|
|
|
|
|
*
|
|
|
|
|
* @author gyt
|
|
|
|
|
* @date 2025-08-25
|
|
|
|
|
*/
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/mountPointInfo")
|
|
|
|
|
public class InitialMountPointInfoController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
@Autowired
|
|
|
|
|
private IInitialMountPointInfoService initialMountPointInfoService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询挂载点监控信息列表
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
2025-09-04 23:18:08 +08:00
|
|
|
@PostMapping("/list")
|
|
|
|
|
public TableDataInfo list(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
2025-08-26 19:14:12 +08:00
|
|
|
{
|
2025-09-04 23:18:08 +08:00
|
|
|
PageDomain pageDomain = new PageDomain();
|
|
|
|
|
pageDomain.setPageNum(initialMountPointInfo.getPageNum());
|
|
|
|
|
pageDomain.setPageSize(initialMountPointInfo.getPageSize());
|
|
|
|
|
startPage(pageDomain);
|
2025-08-26 19:14:12 +08:00
|
|
|
List<InitialMountPointInfo> list = initialMountPointInfoService.selectInitialMountPointInfoList(initialMountPointInfo);
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出挂载点监控信息列表
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:export")
|
|
|
|
|
@Log(title = "挂载点监控信息", businessType = BusinessType.EXPORT)
|
|
|
|
|
@PostMapping("/export")
|
|
|
|
|
public void export(HttpServletResponse response, InitialMountPointInfo initialMountPointInfo)
|
|
|
|
|
{
|
|
|
|
|
List<InitialMountPointInfo> list = initialMountPointInfoService.selectInitialMountPointInfoList(initialMountPointInfo);
|
|
|
|
|
ExcelUtil<InitialMountPointInfo> util = new ExcelUtil<InitialMountPointInfo>(InitialMountPointInfo.class);
|
|
|
|
|
util.exportExcel(response, list, "挂载点监控信息数据");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取挂载点监控信息详细信息
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
|
{
|
|
|
|
|
return success(initialMountPointInfoService.selectInitialMountPointInfoById(id));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增挂载点监控信息
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:add")
|
|
|
|
|
@Log(title = "挂载点监控信息", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping
|
|
|
|
|
public AjaxResult add(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
|
|
|
|
{
|
|
|
|
|
return toAjax(initialMountPointInfoService.insertInitialMountPointInfo(initialMountPointInfo));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改挂载点监控信息
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:edit")
|
|
|
|
|
@Log(title = "挂载点监控信息", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PutMapping
|
|
|
|
|
public AjaxResult edit(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
|
|
|
|
{
|
|
|
|
|
return toAjax(initialMountPointInfoService.updateInitialMountPointInfo(initialMountPointInfo));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除挂载点监控信息
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:remove")
|
|
|
|
|
@Log(title = "挂载点监控信息", businessType = BusinessType.DELETE)
|
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
|
|
{
|
|
|
|
|
return toAjax(initialMountPointInfoService.deleteInitialMountPointInfoByIds(ids));
|
|
|
|
|
}
|
2025-09-17 09:34:00 +08:00
|
|
|
/**
|
|
|
|
|
* 获取挂载点监控信息详细信息
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
|
|
|
|
@PostMapping(value = "/pointDetailsMsg")
|
|
|
|
|
public AjaxResult pointDetailsMsg(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
|
|
|
|
{
|
|
|
|
|
InitialMountPointInfo mountPointInfo = initialMountPointInfoService.pointDetailsMsg(initialMountPointInfo);
|
|
|
|
|
return success(mountPointInfo);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取挂载文件系统/的空间图形
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
|
|
|
|
@PostMapping(value = "/spaceEcharts")
|
|
|
|
|
public AjaxResult spaceEcharts(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
|
|
|
|
{
|
|
|
|
|
Map<String, Object> echartsData = initialMountPointInfoService.spaceEcharts(initialMountPointInfo);
|
|
|
|
|
return success(echartsData);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取挂载文件系统/的空间利用率图形
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
|
|
|
|
@PostMapping(value = "/spaceRateEcharts")
|
|
|
|
|
public AjaxResult spaceRateEcharts(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
|
|
|
|
{
|
|
|
|
|
Map<String, Object> echartsData = initialMountPointInfoService.spaceRateEcharts(initialMountPointInfo);
|
|
|
|
|
return success(echartsData);
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-26 19:14:12 +08:00
|
|
|
}
|