源数据表+入库逻辑+计算95带宽值/日
This commit is contained in:
@@ -3,13 +3,14 @@ package com.ruoyi.rocketmq.consumer;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.DeviceMessage;
|
||||
import com.ruoyi.rocketmq.domain.InitialBandwidthTraffic;
|
||||
import com.ruoyi.rocketmq.domain.*;
|
||||
import com.ruoyi.rocketmq.enums.MessageCodeEnum;
|
||||
import com.ruoyi.rocketmq.producer.ConsumeException;
|
||||
import com.ruoyi.rocketmq.service.IInitialBandwidthTrafficService;
|
||||
import com.ruoyi.rocketmq.service.*;
|
||||
import com.ruoyi.rocketmq.utils.JsonDataParser;
|
||||
import com.ruoyi.system.api.RemoteRevenueConfigService;
|
||||
import com.ruoyi.system.api.domain.EpsInitialTrafficDataRemote;
|
||||
import com.ruoyi.system.api.domain.InitialSwitchInfoDetailsRemote;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
|
||||
@@ -20,7 +21,12 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 消息监听
|
||||
@@ -32,7 +38,22 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
|
||||
private final IInitialBandwidthTrafficService initialBandwidthTrafficService;
|
||||
private final RemoteRevenueConfigService remoteRevenueConfigService;
|
||||
|
||||
@Autowired
|
||||
private IInitialDockerInfoService initialDockerInfoService;
|
||||
@Autowired
|
||||
private IInitialCpuInfoService initialCpuInfoService;
|
||||
@Autowired
|
||||
private IInitialDiskInfoService initialDiskInfoService;
|
||||
@Autowired
|
||||
private IInitialMemoryInfoService initialMemoryInfoService;
|
||||
@Autowired
|
||||
private IInitialMountPointInfoService initialMountPointInfoService;
|
||||
@Autowired
|
||||
private IInitialSwitchInfoService initialSwitchInfoService;
|
||||
@Autowired
|
||||
private IInitialSystemInfoService initialSystemInfoService;
|
||||
@Autowired
|
||||
private IInitialSwitchInfoTempService initialSwitchInfoTempService;
|
||||
@Autowired
|
||||
public RocketMsgListener(IInitialBandwidthTrafficService initialBandwidthTrafficService,
|
||||
RemoteRevenueConfigService remoteRevenueConfigService) {
|
||||
@@ -73,23 +94,36 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
if (MessageCodeEnum.AGENT_MESSAGE_TOPIC.getCode().equals(topic)) {
|
||||
// 拿到信息
|
||||
DeviceMessage message = JSON.parseObject(body, DeviceMessage.class);
|
||||
String duringTime = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",message.getReceiveTime());
|
||||
message.setDuringTime(duringTime);
|
||||
message.setReceiveTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss",duringTime));
|
||||
switch (message.getDataType()){
|
||||
case "NET":
|
||||
handleNetMessage(message);
|
||||
break;
|
||||
case "CPU":
|
||||
handleCpuMessage(message);
|
||||
break;
|
||||
case "SYSTEM":
|
||||
handleSystemMessage(message);
|
||||
break;
|
||||
case "DISK":
|
||||
handleDiskMessage(message);
|
||||
break;
|
||||
case "POINT":
|
||||
handleMountPointMessage(message);
|
||||
break;
|
||||
case "MEMORY":
|
||||
handleMemoryMessage(message);
|
||||
break;
|
||||
case "DOCKER":
|
||||
handleDockerMessage(message);
|
||||
break;
|
||||
case "SWITCHBOARD":
|
||||
handleSwitchMessage(message);
|
||||
break;
|
||||
default:
|
||||
log.warn("未知数据类型:{}",message.getDataType());
|
||||
|
||||
}
|
||||
//处理你的业务
|
||||
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//业务处理成功
|
||||
@@ -117,6 +151,8 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
log.error(e.getMessage());
|
||||
} else if (exceptionClass.equals(ConsumeException.class)) {
|
||||
log.error(e.getMessage());
|
||||
} else{
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return ConsumeConcurrentlyStatus.RECONSUME_LATER;
|
||||
}
|
||||
@@ -126,24 +162,185 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
* @param message
|
||||
*/
|
||||
private void handleNetMessage(DeviceMessage message) {
|
||||
List<InitialBandwidthTraffic> interfaces = JSON.parseArray(message.getData(), InitialBandwidthTraffic.class);
|
||||
InitialBandwidthTraffic data = new InitialBandwidthTraffic();
|
||||
interfaces.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
});
|
||||
// 批量入库集合
|
||||
data.setList(interfaces);
|
||||
// 开始时间
|
||||
String startTime = DateUtils.getTime();
|
||||
// 初始流量数据入库
|
||||
initialBandwidthTrafficService.batchInsert(data);
|
||||
// 结束时间
|
||||
String endTime = DateUtils.getTime();
|
||||
EpsInitialTrafficDataRemote epsInitialTrafficDataRemote = new EpsInitialTrafficDataRemote();
|
||||
epsInitialTrafficDataRemote.setStartTime(startTime);
|
||||
epsInitialTrafficDataRemote.setEndTime(endTime);
|
||||
// 复制到业务初始库
|
||||
remoteRevenueConfigService.autoSaveServiceTrafficData(epsInitialTrafficDataRemote, SecurityConstants.INNER);
|
||||
List<InitialBandwidthTraffic> interfaces = JsonDataParser.parseJsonData(message.getData(), InitialBandwidthTraffic.class);
|
||||
if(!interfaces.isEmpty()){
|
||||
InitialBandwidthTraffic data = new InitialBandwidthTraffic();
|
||||
interfaces.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 批量入库集合
|
||||
data.setList(interfaces);
|
||||
// 初始流量数据入库
|
||||
initialBandwidthTrafficService.batchInsert(data);
|
||||
EpsInitialTrafficDataRemote epsInitialTrafficDataRemote = new EpsInitialTrafficDataRemote();
|
||||
epsInitialTrafficDataRemote.setStartTime(message.getDuringTime());
|
||||
epsInitialTrafficDataRemote.setEndTime(message.getDuringTime());
|
||||
// 复制到业务初始库
|
||||
remoteRevenueConfigService.autoSaveServiceTrafficData(epsInitialTrafficDataRemote, SecurityConstants.INNER);
|
||||
}else{
|
||||
throw new RuntimeException("NET流量data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* docker数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleDockerMessage(DeviceMessage message) {
|
||||
List<InitialDockerInfo> dockers = JsonDataParser.parseJsonData(message.getData(), InitialDockerInfo.class);
|
||||
if(!dockers.isEmpty()){
|
||||
dockers.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始容器数据入库
|
||||
initialDockerInfoService.batchInsertInitialDockerInfo(dockers);
|
||||
}else{
|
||||
throw new RuntimeException("DOCKER容器data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* cpu数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleCpuMessage(DeviceMessage message) {
|
||||
List<InitialCpuInfo> cpus = JsonDataParser.parseJsonData(message.getData(),InitialCpuInfo.class);
|
||||
if(!cpus.isEmpty()){
|
||||
cpus.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始CPU数据入库
|
||||
initialCpuInfoService.batchInsertInitialCpuInfo(cpus);
|
||||
}else{
|
||||
throw new RuntimeException("CPUdata数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 磁盘数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleDiskMessage(DeviceMessage message) {
|
||||
List<InitialDiskInfo> disks = JsonDataParser.parseJsonData(message.getData(), InitialDiskInfo.class);
|
||||
if(!disks.isEmpty()){
|
||||
disks.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始磁盘数据入库
|
||||
initialDiskInfoService.batchInsertInitialDiskInfo(disks);
|
||||
}else{
|
||||
throw new RuntimeException("磁盘data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 内存数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleMemoryMessage(DeviceMessage message) {
|
||||
List<InitialMemoryInfo> memorys = JsonDataParser.parseJsonData(message.getData(), InitialMemoryInfo.class);
|
||||
if(!memorys.isEmpty()){
|
||||
memorys.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始内存数据入库
|
||||
initialMemoryInfoService.batchInsertInitialMemoryInfo(memorys);
|
||||
}else{
|
||||
throw new RuntimeException("内存data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 挂载点数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleMountPointMessage(DeviceMessage message) {
|
||||
List<InitialMountPointInfo> mountPointInfos = JsonDataParser.parseJsonData(message.getData(), InitialMountPointInfo.class);
|
||||
if(!mountPointInfos.isEmpty()){
|
||||
mountPointInfos.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始挂载点数据入库
|
||||
initialMountPointInfoService.batchInsertInitialMountPointInfo(mountPointInfos);
|
||||
}else{
|
||||
throw new RuntimeException("挂载点data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 交换机数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleSwitchMessage(DeviceMessage message) {
|
||||
List<InitialSwitchInfo> switchInfos = JsonDataParser.parseJsonData(message.getData(), InitialSwitchInfo.class);
|
||||
if(!switchInfos.isEmpty()){
|
||||
// 查询临时表信息,计算实际流量值
|
||||
InitialSwitchInfoTemp temp = new InitialSwitchInfoTemp();
|
||||
temp.setClientId(message.getClientId());
|
||||
List<InitialSwitchInfoTemp> tempList = initialSwitchInfoTempService.selectInitialSwitchInfoTempList(temp);
|
||||
if(!tempList.isEmpty()){
|
||||
// 1. 构建快速查找的Map
|
||||
Map<String, InitialSwitchInfoTemp> tempMap = tempList.stream()
|
||||
.collect(Collectors.toMap(
|
||||
InitialSwitchInfoTemp::getName,
|
||||
Function.identity(),
|
||||
(existing, replacement) -> existing
|
||||
));
|
||||
|
||||
// 2. 预计算除数(避免重复创建对象)
|
||||
BigDecimal divisor = new BigDecimal(300);
|
||||
|
||||
// 3. 计算速度
|
||||
switchInfos.forEach(switchInfo -> {
|
||||
switchInfo.setClientId(message.getClientId());
|
||||
switchInfo.setCreateTime(message.getReceiveTime());
|
||||
InitialSwitchInfoTemp tempInfo = tempMap.get(switchInfo.getName());
|
||||
if (tempInfo != null) {
|
||||
// 计算inSpeed
|
||||
if (switchInfo.getInBytes() != null && tempInfo.getInBytes() != null) {
|
||||
BigDecimal inDiff = switchInfo.getInBytes().subtract(tempInfo.getInBytes());
|
||||
switchInfo.setInSpeed(inDiff.divide(divisor, 2, RoundingMode.HALF_UP));
|
||||
}
|
||||
|
||||
// 计算outSpeed
|
||||
if (switchInfo.getOutBytes() != null && tempInfo.getOutBytes() != null) {
|
||||
BigDecimal outDiff = switchInfo.getOutBytes().subtract(tempInfo.getOutBytes());
|
||||
switchInfo.setOutSpeed(outDiff.divide(divisor, 2, RoundingMode.HALF_UP));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 清空临时表
|
||||
initialSwitchInfoTempService.truncateSwitchInfoTemp();
|
||||
// 临时表 用来计算inSpeed outSeppd
|
||||
initialSwitchInfoTempService.batchInsertInitialSwitchInfoTemp(switchInfos);
|
||||
// 初始交换机数据入库
|
||||
initialSwitchInfoService.batchInsertInitialSwitchInfo(switchInfos);
|
||||
// 业务表入库
|
||||
InitialSwitchInfoDetailsRemote detailsRemote = new InitialSwitchInfoDetailsRemote();
|
||||
detailsRemote.setClientId(message.getClientId());
|
||||
detailsRemote.setStartTime(message.getDuringTime());
|
||||
detailsRemote.setEndTime(message.getDuringTime());
|
||||
remoteRevenueConfigService.autoSaveSwitchTraffic(detailsRemote, SecurityConstants.INNER);
|
||||
}else{
|
||||
throw new RuntimeException("交换机data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 系统数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleSystemMessage(DeviceMessage message) {
|
||||
List<InitialSystemInfo> systemInfos = JsonDataParser.parseJsonData(message.getData(), InitialSystemInfo.class);
|
||||
if(!systemInfos.isEmpty()){
|
||||
systemInfos.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始系统数据入库
|
||||
initialSystemInfoService.batchInsertInitialSystemInfo(systemInfos);
|
||||
}else{
|
||||
throw new RuntimeException("系统data数据为空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.InitialCpuInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialCpuInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* CPU监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cpuInfo")
|
||||
public class InitialCpuInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialCpuInfoService initialCpuInfoService;
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialCpuInfo> list = initialCpuInfoService.selectInitialCpuInfoList(initialCpuInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出CPU监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:export")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
List<InitialCpuInfo> list = initialCpuInfoService.selectInitialCpuInfoList(initialCpuInfo);
|
||||
ExcelUtil<InitialCpuInfo> util = new ExcelUtil<InitialCpuInfo>(InitialCpuInfo.class);
|
||||
util.exportExcel(response, list, "CPU监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取CPU监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialCpuInfoService.selectInitialCpuInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:add")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
return toAjax(initialCpuInfoService.insertInitialCpuInfo(initialCpuInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:edit")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
return toAjax(initialCpuInfoService.updateInitialCpuInfo(initialCpuInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:remove")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialCpuInfoService.deleteInitialCpuInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.InitialDiskInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialDiskInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/diskInfo")
|
||||
public class InitialDiskInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialDiskInfoService initialDiskInfoService;
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialDiskInfo> list = initialDiskInfoService.selectInitialDiskInfoList(initialDiskInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出磁盘监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:export")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
List<InitialDiskInfo> list = initialDiskInfoService.selectInitialDiskInfoList(initialDiskInfo);
|
||||
ExcelUtil<InitialDiskInfo> util = new ExcelUtil<InitialDiskInfo>(InitialDiskInfo.class);
|
||||
util.exportExcel(response, list, "磁盘监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取磁盘监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialDiskInfoService.selectInitialDiskInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:add")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
return toAjax(initialDiskInfoService.insertInitialDiskInfo(initialDiskInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:edit")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
return toAjax(initialDiskInfoService.updateInitialDiskInfo(initialDiskInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:remove")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialDiskInfoService.deleteInitialDiskInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.InitialDockerInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialDockerInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 容器监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dockerInfo")
|
||||
public class InitialDockerInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialDockerInfoService initialDockerInfoService;
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialDockerInfo> list = initialDockerInfoService.selectInitialDockerInfoList(initialDockerInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出容器监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:export")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
List<InitialDockerInfo> list = initialDockerInfoService.selectInitialDockerInfoList(initialDockerInfo);
|
||||
ExcelUtil<InitialDockerInfo> util = new ExcelUtil<InitialDockerInfo>(InitialDockerInfo.class);
|
||||
util.exportExcel(response, list, "容器监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取容器监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialDockerInfoService.selectInitialDockerInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:add")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
return toAjax(initialDockerInfoService.insertInitialDockerInfo(initialDockerInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:edit")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
return toAjax(initialDockerInfoService.updateInitialDockerInfo(initialDockerInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除容器监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:remove")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialDockerInfoService.deleteInitialDockerInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.InitialMemoryInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialMemoryInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 内存监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/memoryInfo")
|
||||
public class InitialMemoryInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialMemoryInfoService initialMemoryInfoService;
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialMemoryInfo> list = initialMemoryInfoService.selectInitialMemoryInfoList(initialMemoryInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出内存监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:export")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
List<InitialMemoryInfo> list = initialMemoryInfoService.selectInitialMemoryInfoList(initialMemoryInfo);
|
||||
ExcelUtil<InitialMemoryInfo> util = new ExcelUtil<InitialMemoryInfo>(InitialMemoryInfo.class);
|
||||
util.exportExcel(response, list, "内存监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取内存监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialMemoryInfoService.selectInitialMemoryInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:add")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
return toAjax(initialMemoryInfoService.insertInitialMemoryInfo(initialMemoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:edit")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
return toAjax(initialMemoryInfoService.updateInitialMemoryInfo(initialMemoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除内存监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:remove")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialMemoryInfoService.deleteInitialMemoryInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mountPointInfo")
|
||||
public class InitialMountPointInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialMountPointInfoService initialMountPointInfoService;
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
startPage();
|
||||
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));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchInfo")
|
||||
public class InitialSwitchInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchInfoService initialSwitchInfoService;
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchInfo> list = initialSwitchInfoService.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机流量监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:export")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
List<InitialSwitchInfo> list = initialSwitchInfoService.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||
ExcelUtil<InitialSwitchInfo> util = new ExcelUtil<InitialSwitchInfo>(InitialSwitchInfo.class);
|
||||
util.exportExcel(response, list, "交换机流量监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机流量监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchInfoService.selectInitialSwitchInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:add")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
return toAjax(initialSwitchInfoService.insertInitialSwitchInfo(initialSwitchInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:edit")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
return toAjax(initialSwitchInfoService.updateInitialSwitchInfo(initialSwitchInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:remove")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchInfoService.deleteInitialSwitchInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.InitialSwitchInfoTemp;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoTempService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/temp")
|
||||
public class InitialSwitchInfoTempController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchInfoTempService initialSwitchInfoTempService;
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchInfoTemp> list = initialSwitchInfoTempService.selectInitialSwitchInfoTempList(initialSwitchInfoTemp);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:export")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
List<InitialSwitchInfoTemp> list = initialSwitchInfoTempService.selectInitialSwitchInfoTempList(initialSwitchInfoTemp);
|
||||
ExcelUtil<InitialSwitchInfoTemp> util = new ExcelUtil<InitialSwitchInfoTemp>(InitialSwitchInfoTemp.class);
|
||||
util.exportExcel(response, list, "交换机监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchInfoTempService.selectInitialSwitchInfoTempById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:add")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
return toAjax(initialSwitchInfoTempService.insertInitialSwitchInfoTemp(initialSwitchInfoTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:edit")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
return toAjax(initialSwitchInfoTempService.updateInitialSwitchInfoTemp(initialSwitchInfoTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:remove")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchInfoTempService.deleteInitialSwitchInfoTempByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.InitialSystemInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialSystemInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 系统监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/systemInfo")
|
||||
public class InitialSystemInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSystemInfoService initialSystemInfoService;
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSystemInfo> list = initialSystemInfoService.selectInitialSystemInfoList(initialSystemInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出系统监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:export")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
List<InitialSystemInfo> list = initialSystemInfoService.selectInitialSystemInfoList(initialSystemInfo);
|
||||
ExcelUtil<InitialSystemInfo> util = new ExcelUtil<InitialSystemInfo>(InitialSystemInfo.class);
|
||||
util.exportExcel(response, list, "系统监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSystemInfoService.selectInitialSystemInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:add")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
return toAjax(initialSystemInfoService.insertInitialSystemInfo(initialSystemInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:edit")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
return toAjax(initialSystemInfoService.updateInitialSystemInfo(initialSystemInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:remove")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSystemInfoService.deleteInitialSystemInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DeviceMessage {
|
||||
private String clientId;
|
||||
private String dataType;
|
||||
private String data;
|
||||
private LocalDateTime receiveTime = LocalDateTime.now();
|
||||
private Date receiveTime = DateUtils.getNowDate();
|
||||
private String duringTime;
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* CPU监控信息对象 initial_cpu_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public class InitialCpuInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** CPU1分钟负载 */
|
||||
@Excel(name = "CPU1分钟负载")
|
||||
private long avg1;
|
||||
|
||||
/** CPU5分钟负载 */
|
||||
@Excel(name = "CPU5分钟负载")
|
||||
private long avg5;
|
||||
|
||||
/** CPU15分钟负载 */
|
||||
@Excel(name = "CPU15分钟负载")
|
||||
private long avg15;
|
||||
|
||||
/** CPU硬件中断提供服务时间(秒) */
|
||||
@Excel(name = "CPU硬件中断提供服务时间(秒)")
|
||||
private long interrupt;
|
||||
|
||||
/** CPU使用率(%) */
|
||||
@Excel(name = "CPU使用率(%)")
|
||||
private long uti;
|
||||
|
||||
/** CPU数量(核数) */
|
||||
@Excel(name = "CPU数量(核数)")
|
||||
private long num;
|
||||
|
||||
/** CPU正常运行时间(秒) */
|
||||
@Excel(name = "CPU正常运行时间(秒)")
|
||||
private Long normal;
|
||||
|
||||
/** CPU空闲时间(秒) */
|
||||
@Excel(name = "CPU空闲时间(秒)")
|
||||
private long idle;
|
||||
|
||||
/** CPU等待响应时间(秒) */
|
||||
@Excel(name = "CPU等待响应时间(秒)")
|
||||
private long iowait;
|
||||
|
||||
/** CPU系统时间(秒) */
|
||||
@Excel(name = "CPU系统时间(秒)")
|
||||
private long system;
|
||||
|
||||
/** CPU软件无响应时间(秒) */
|
||||
@Excel(name = "CPU软件无响应时间(秒)")
|
||||
private long noresp;
|
||||
|
||||
/** CPU用户进程所花费的时间(秒) */
|
||||
@Excel(name = "CPU用户进程所花费的时间(秒)")
|
||||
private long user;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setAvg1(long avg1)
|
||||
{
|
||||
this.avg1 = avg1;
|
||||
}
|
||||
|
||||
public long getAvg1()
|
||||
{
|
||||
return avg1;
|
||||
}
|
||||
|
||||
public void setAvg5(long avg5)
|
||||
{
|
||||
this.avg5 = avg5;
|
||||
}
|
||||
|
||||
public long getAvg5()
|
||||
{
|
||||
return avg5;
|
||||
}
|
||||
|
||||
public void setAvg15(long avg15)
|
||||
{
|
||||
this.avg15 = avg15;
|
||||
}
|
||||
|
||||
public long getAvg15()
|
||||
{
|
||||
return avg15;
|
||||
}
|
||||
|
||||
public void setInterrupt(long interrupt)
|
||||
{
|
||||
this.interrupt = interrupt;
|
||||
}
|
||||
|
||||
public long getInterrupt()
|
||||
{
|
||||
return interrupt;
|
||||
}
|
||||
|
||||
public void setUti(long uti)
|
||||
{
|
||||
this.uti = uti;
|
||||
}
|
||||
|
||||
public long getUti()
|
||||
{
|
||||
return uti;
|
||||
}
|
||||
|
||||
public void setNum(long num)
|
||||
{
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public long getNum()
|
||||
{
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNormal(Long normal)
|
||||
{
|
||||
this.normal = normal;
|
||||
}
|
||||
|
||||
public Long getNormal()
|
||||
{
|
||||
return normal;
|
||||
}
|
||||
|
||||
public void setIdle(long idle)
|
||||
{
|
||||
this.idle = idle;
|
||||
}
|
||||
|
||||
public long getIdle()
|
||||
{
|
||||
return idle;
|
||||
}
|
||||
|
||||
public void setIowait(long iowait)
|
||||
{
|
||||
this.iowait = iowait;
|
||||
}
|
||||
|
||||
public long getIowait()
|
||||
{
|
||||
return iowait;
|
||||
}
|
||||
|
||||
public void setSystem(long system)
|
||||
{
|
||||
this.system = system;
|
||||
}
|
||||
|
||||
public long getSystem()
|
||||
{
|
||||
return system;
|
||||
}
|
||||
|
||||
public void setNoresp(long noresp)
|
||||
{
|
||||
this.noresp = noresp;
|
||||
}
|
||||
|
||||
public long getNoresp()
|
||||
{
|
||||
return noresp;
|
||||
}
|
||||
|
||||
public void setUser(long user)
|
||||
{
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public long getUser()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("avg1", getAvg1())
|
||||
.append("avg5", getAvg5())
|
||||
.append("avg15", getAvg15())
|
||||
.append("interrupt", getInterrupt())
|
||||
.append("uti", getUti())
|
||||
.append("num", getNum())
|
||||
.append("normal", getNormal())
|
||||
.append("idle", getIdle())
|
||||
.append("iowait", getIowait())
|
||||
.append("system", getSystem())
|
||||
.append("noresp", getNoresp())
|
||||
.append("user", getUser())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息对象 initial_disk_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public class InitialDiskInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 磁盘名称(如sda、sdb等) */
|
||||
@Excel(name = "磁盘名称(如sda、sdb等)")
|
||||
private String name;
|
||||
|
||||
/** 磁盘序列号 */
|
||||
@Excel(name = "磁盘序列号")
|
||||
private String serial;
|
||||
|
||||
/** 磁盘总大小(GB) */
|
||||
@Excel(name = "磁盘总大小(GB)")
|
||||
private Long total;
|
||||
|
||||
/** 磁盘写入速率(字节/秒) */
|
||||
@Excel(name = "磁盘写入速率(字节/秒)")
|
||||
private Long writeSpeed;
|
||||
|
||||
/** 磁盘读取速率(字节/秒) */
|
||||
@Excel(name = "磁盘读取速率(字节/秒)")
|
||||
private Long readSpeed;
|
||||
|
||||
/** 磁盘写入次数 */
|
||||
@Excel(name = "磁盘写入次数")
|
||||
private Long writeTimes;
|
||||
|
||||
/** 磁盘读取次数 */
|
||||
@Excel(name = "磁盘读取次数")
|
||||
private Long readTimes;
|
||||
|
||||
/** 磁盘写入总字节数 */
|
||||
@Excel(name = "磁盘写入总字节数")
|
||||
private Long writeBytes;
|
||||
|
||||
/** 磁盘读取总字节数 */
|
||||
@Excel(name = "磁盘读取总字节数")
|
||||
private Long readBytes;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setSerial(String serial)
|
||||
{
|
||||
this.serial = serial;
|
||||
}
|
||||
|
||||
public String getSerial()
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
|
||||
public void setTotal(Long total)
|
||||
{
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Long getTotal()
|
||||
{
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setWriteSpeed(Long writeSpeed)
|
||||
{
|
||||
this.writeSpeed = writeSpeed;
|
||||
}
|
||||
|
||||
public Long getWriteSpeed()
|
||||
{
|
||||
return writeSpeed;
|
||||
}
|
||||
|
||||
public void setReadSpeed(Long readSpeed)
|
||||
{
|
||||
this.readSpeed = readSpeed;
|
||||
}
|
||||
|
||||
public Long getReadSpeed()
|
||||
{
|
||||
return readSpeed;
|
||||
}
|
||||
|
||||
public void setWriteTimes(Long writeTimes)
|
||||
{
|
||||
this.writeTimes = writeTimes;
|
||||
}
|
||||
|
||||
public Long getWriteTimes()
|
||||
{
|
||||
return writeTimes;
|
||||
}
|
||||
|
||||
public void setReadTimes(Long readTimes)
|
||||
{
|
||||
this.readTimes = readTimes;
|
||||
}
|
||||
|
||||
public Long getReadTimes()
|
||||
{
|
||||
return readTimes;
|
||||
}
|
||||
|
||||
public void setWriteBytes(Long writeBytes)
|
||||
{
|
||||
this.writeBytes = writeBytes;
|
||||
}
|
||||
|
||||
public Long getWriteBytes()
|
||||
{
|
||||
return writeBytes;
|
||||
}
|
||||
|
||||
public void setReadBytes(Long readBytes)
|
||||
{
|
||||
this.readBytes = readBytes;
|
||||
}
|
||||
|
||||
public Long getReadBytes()
|
||||
{
|
||||
return readBytes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("name", getName())
|
||||
.append("serial", getSerial())
|
||||
.append("total", getTotal())
|
||||
.append("writeSpeed", getWriteSpeed())
|
||||
.append("readSpeed", getReadSpeed())
|
||||
.append("writeTimes", getWriteTimes())
|
||||
.append("readTimes", getReadTimes())
|
||||
.append("writeBytes", getWriteBytes())
|
||||
.append("readBytes", getReadBytes())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 容器监控信息对象 initial_docker_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialDockerInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long autoId;
|
||||
/** 容器ID */
|
||||
private String id;
|
||||
|
||||
/** 容器名称 */
|
||||
@Excel(name = "容器名称")
|
||||
private String name;
|
||||
|
||||
/** 容器状态(running/stopped/error等) */
|
||||
@Excel(name = "容器状态(running/stopped/error等)")
|
||||
private String status;
|
||||
|
||||
/** 容器CPU使用率(%) */
|
||||
@Excel(name = "容器CPU使用率(%)")
|
||||
private String cpuUtil;
|
||||
|
||||
/** 容器内存使用率(%) */
|
||||
@Excel(name = "容器内存使用率(%)")
|
||||
private String memUtil;
|
||||
|
||||
/** 容器网络接收速率(KB/s) */
|
||||
@Excel(name = "容器网络接收速率(KB/s)")
|
||||
private String netInSpeed;
|
||||
|
||||
/** 容器网络发送速率(KB/s) */
|
||||
@Excel(name = "容器网络发送速率(KB/s)")
|
||||
private String netOutSpeed;
|
||||
|
||||
/** 设备唯一标识 */
|
||||
@Excel(name = "设备唯一标识")
|
||||
private String clientId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 内存监控信息对象 initial_memory_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialMemoryInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 交换卷/文件的可用空间(字节) */
|
||||
@Excel(name = "交换卷/文件的可用空间(字节)")
|
||||
private BigDecimal swapSizeFree;
|
||||
|
||||
/** 内存利用率(%) */
|
||||
@Excel(name = "内存利用率(%)")
|
||||
private BigDecimal untilzation;
|
||||
|
||||
/** 可用交换空间百分比(%) */
|
||||
@Excel(name = "可用交换空间百分比(%)")
|
||||
private BigDecimal swapSizePercent;
|
||||
|
||||
/** 可用内存(字节) */
|
||||
@Excel(name = "可用内存(字节)")
|
||||
private Long available;
|
||||
|
||||
/** 可用内存百分比(%) */
|
||||
@Excel(name = "可用内存百分比(%)")
|
||||
private BigDecimal percent;
|
||||
|
||||
/** 总内存(字节) */
|
||||
@Excel(name = "总内存(字节)")
|
||||
private Long total;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息对象 initial_mount_point_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public class InitialMountPointInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 挂载点路径(如"/"、"/data"等) */
|
||||
@Excel(name = "挂载点路径")
|
||||
private String mount;
|
||||
|
||||
/** 文件系统类型(如ext4、xfs、ntfs等) */
|
||||
@Excel(name = "文件系统类型")
|
||||
private String vfsType;
|
||||
|
||||
/** 可用空间(字节) */
|
||||
@Excel(name = "可用空间")
|
||||
private Long vfsFree;
|
||||
|
||||
/** 总空间(字节) */
|
||||
@Excel(name = "总空间")
|
||||
private Long vfsTotal;
|
||||
|
||||
/** 空间利用率(%) */
|
||||
@Excel(name = "空间利用率")
|
||||
private BigDecimal vfsUtil;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setMount(String mount)
|
||||
{
|
||||
this.mount = mount;
|
||||
}
|
||||
|
||||
public String getMount()
|
||||
{
|
||||
return mount;
|
||||
}
|
||||
|
||||
public void setVfsType(String vfsType)
|
||||
{
|
||||
this.vfsType = vfsType;
|
||||
}
|
||||
|
||||
public String getVfsType()
|
||||
{
|
||||
return vfsType;
|
||||
}
|
||||
|
||||
public void setVfsFree(Long vfsFree)
|
||||
{
|
||||
this.vfsFree = vfsFree;
|
||||
}
|
||||
|
||||
public Long getVfsFree()
|
||||
{
|
||||
return vfsFree;
|
||||
}
|
||||
|
||||
public void setVfsTotal(Long vfsTotal)
|
||||
{
|
||||
this.vfsTotal = vfsTotal;
|
||||
}
|
||||
|
||||
public Long getVfsTotal()
|
||||
{
|
||||
return vfsTotal;
|
||||
}
|
||||
|
||||
public void setVfsUtil(BigDecimal vfsUtil)
|
||||
{
|
||||
this.vfsUtil = vfsUtil;
|
||||
}
|
||||
|
||||
public BigDecimal getVfsUtil()
|
||||
{
|
||||
return vfsUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("mount", getMount())
|
||||
.append("vfsType", getVfsType())
|
||||
.append("vfsFree", getVfsFree())
|
||||
.append("vfsTotal", getVfsTotal())
|
||||
.append("vfsUtil", getVfsUtil())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息对象 initial_switch_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
/** 接收流量 */
|
||||
private BigDecimal inBytes;
|
||||
/** 发送流量 */
|
||||
private BigDecimal outBytes;
|
||||
/** 状态 */
|
||||
private String status;
|
||||
/** 类型 */
|
||||
private String type;
|
||||
/** 接收流量(bytes/s) */
|
||||
private BigDecimal inSpeed;
|
||||
/** 发送流量(bytes/s) */
|
||||
private BigDecimal outSpeed;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 交换机监控信息对象 initial_switch_info_temp
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public class InitialSwitchInfoTemp extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 网络接口名称(如eth0、ens33等) */
|
||||
@Excel(name = "网络接口名称(如eth0、ens33等)")
|
||||
private String name;
|
||||
|
||||
/** 接收流量(字节) */
|
||||
@Excel(name = "接收流量(字节)")
|
||||
private BigDecimal inBytes;
|
||||
|
||||
/** 发送流量(字节) */
|
||||
@Excel(name = "发送流量(字节)")
|
||||
private BigDecimal outBytes;
|
||||
|
||||
/** 接口状态(up/down等) */
|
||||
@Excel(name = "接口状态(up/down等)")
|
||||
private String status;
|
||||
|
||||
/** 接口类型(ethernet/wireless等) */
|
||||
@Excel(name = "接口类型(ethernet/wireless等)")
|
||||
private String type;
|
||||
|
||||
/** 接收流量(bytes/s) */
|
||||
@Excel(name = "接收流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal inSpeed;
|
||||
|
||||
/** 发送流量(bytes/s) */
|
||||
@Excel(name = "发送流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal outSpeed;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setInBytes(BigDecimal inBytes)
|
||||
{
|
||||
this.inBytes = inBytes;
|
||||
}
|
||||
|
||||
public BigDecimal getInBytes()
|
||||
{
|
||||
return inBytes;
|
||||
}
|
||||
|
||||
public void setOutBytes(BigDecimal outBytes)
|
||||
{
|
||||
this.outBytes = outBytes;
|
||||
}
|
||||
|
||||
public BigDecimal getOutBytes()
|
||||
{
|
||||
return outBytes;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setInSpeed(BigDecimal inSpeed)
|
||||
{
|
||||
this.inSpeed = inSpeed;
|
||||
}
|
||||
|
||||
public BigDecimal getInSpeed()
|
||||
{
|
||||
return inSpeed;
|
||||
}
|
||||
|
||||
public void setOutSpeed(BigDecimal outSpeed)
|
||||
{
|
||||
this.outSpeed = outSpeed;
|
||||
}
|
||||
|
||||
public BigDecimal getOutSpeed()
|
||||
{
|
||||
return outSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("name", getName())
|
||||
.append("inBytes", getInBytes())
|
||||
.append("outBytes", getOutBytes())
|
||||
.append("status", getStatus())
|
||||
.append("type", getType())
|
||||
.append("inSpeed", getInSpeed())
|
||||
.append("outSpeed", getOutSpeed())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 系统监控信息对象 initial_system_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialSystemInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 操作系统(如Linux、Windows等) */
|
||||
@Excel(name = "操作系统(如Linux、Windows等)")
|
||||
private String os;
|
||||
|
||||
/** 操作系统架构(如x86_64、arm64等) */
|
||||
@Excel(name = "操作系统架构(如x86_64、arm64等)")
|
||||
private String arch;
|
||||
|
||||
/** 最大进程数 */
|
||||
@Excel(name = "最大进程数")
|
||||
private Long maxProc;
|
||||
|
||||
/** 正在运行的进程数 */
|
||||
@Excel(name = "正在运行的进程数")
|
||||
private Long runProcNum;
|
||||
|
||||
/** 登录用户数 */
|
||||
@Excel(name = "登录用户数")
|
||||
private Long usersNum;
|
||||
|
||||
/** 硬盘总可用空间(GB) */
|
||||
@Excel(name = "硬盘总可用空间(GB)")
|
||||
private BigDecimal diskSizeTotal;
|
||||
|
||||
/** 系统启动时间(Unix时间戳) */
|
||||
@Excel(name = "系统启动时间(Unix时间戳)")
|
||||
private Long bootTime;
|
||||
|
||||
/** 系统描述(如Linux 5.4.0-80-generic) */
|
||||
@Excel(name = "系统描述(如Linux 5.4.0-80-generic)")
|
||||
private String uname;
|
||||
|
||||
/** 系统本地时间(如2023-08-15 14:30:00) */
|
||||
@Excel(name = "系统本地时间(如2023-08-15 14:30:00)")
|
||||
private String localTime;
|
||||
|
||||
/** 系统正常运行时间(秒) */
|
||||
@Excel(name = "系统正常运行时间(秒)")
|
||||
private Long upTime;
|
||||
|
||||
/** 进程数 */
|
||||
@Excel(name = "进程数")
|
||||
private BigDecimal procNum;
|
||||
|
||||
/** 记录时间戳(Unix时间戳) */
|
||||
@Excel(name = "记录时间戳(Unix时间戳)")
|
||||
private Long timeStamp;
|
||||
|
||||
private String uuid;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialCpuInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CPU监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialCpuInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
public InitialCpuInfo selectInitialCpuInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return CPU监控信息集合
|
||||
*/
|
||||
public List<InitialCpuInfo> selectInitialCpuInfoList(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除CPU监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增CPU监控信息
|
||||
*
|
||||
* @param list CPU监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialCpuInfo(@Param("list") List<InitialCpuInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDiskInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialDiskInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
public InitialDiskInfo selectInitialDiskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 磁盘监控信息集合
|
||||
*/
|
||||
public List<InitialDiskInfo> selectInitialDiskInfoList(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除磁盘监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增磁盘监控信息
|
||||
*
|
||||
* @param list 磁盘监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialDiskInfo(@Param("list") List<InitialDiskInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDockerInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialDockerInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询容器监控信息
|
||||
*
|
||||
* @param autoId 容器监控信息主键
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
public InitialDockerInfo selectInitialDockerInfoById(Long autoId);
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 容器监控信息集合
|
||||
*/
|
||||
public List<InitialDockerInfo> selectInitialDockerInfoList(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 删除容器监控信息
|
||||
*
|
||||
* @param autoId 容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoById(Long autoId);
|
||||
|
||||
/**
|
||||
* 批量删除容器监控信息
|
||||
*
|
||||
* @param autoId 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoByIds(Long[] autoId);
|
||||
|
||||
int batchInsertInitialDockerInfo(@Param("list") List<InitialDockerInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMemoryInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 内存监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialMemoryInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
public InitialMemoryInfo selectInitialMemoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 内存监控信息集合
|
||||
*/
|
||||
public List<InitialMemoryInfo> selectInitialMemoryInfoList(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 删除内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除内存监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增内存监控信息
|
||||
*
|
||||
* @param list 内存监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMemoryInfo(@Param("list") List<InitialMemoryInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialMountPointInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
public InitialMountPointInfo selectInitialMountPointInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 挂载点监控信息集合
|
||||
*/
|
||||
public List<InitialMountPointInfo> selectInitialMountPointInfoList(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 新增挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 修改挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 删除挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除挂载点监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增挂载点监控信息
|
||||
*
|
||||
* @param list 挂载点监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMountPointInfo(@Param("list") List<InitialMountPointInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialSwitchInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
public InitialSwitchInfo selectInitialSwitchInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 交换机流量监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfo> selectInitialSwitchInfoList(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除交换机流量监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfo(@Param("list") List<InitialSwitchInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public interface InitialSwitchInfoTempMapper
|
||||
{
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
public InitialSwitchInfoTemp selectInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 交换机监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfoTemp> selectInitialSwitchInfoTempList(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfoTemp(@Param("list") List<InitialSwitchInfo> list);
|
||||
|
||||
void truncateSwitchInfoTemp();
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSystemInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialSystemInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
public InitialSystemInfo selectInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 系统监控信息集合
|
||||
*/
|
||||
public List<InitialSystemInfo> selectInitialSystemInfoList(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 删除系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除系统监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增系统监控信息
|
||||
*
|
||||
* @param list 系统监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
int batchInsertInitialSystemInfo(@Param("list") List<InitialSystemInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialCpuInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CPU监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialCpuInfoService
|
||||
{
|
||||
/**
|
||||
* 查询CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
public InitialCpuInfo selectInitialCpuInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return CPU监控信息集合
|
||||
*/
|
||||
public List<InitialCpuInfo> selectInitialCpuInfoList(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 批量删除CPU监控信息
|
||||
*
|
||||
* @param ids 需要删除的CPU监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoById(Long id);
|
||||
/**
|
||||
* 批量新增CPU监控信息信息
|
||||
*
|
||||
* @param list CPU监控信息信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialCpuInfo(List<InitialCpuInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDiskInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialDiskInfoService
|
||||
{
|
||||
/**
|
||||
* 查询磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
public InitialDiskInfo selectInitialDiskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 磁盘监控信息集合
|
||||
*/
|
||||
public List<InitialDiskInfo> selectInitialDiskInfoList(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 批量删除磁盘监控信息
|
||||
*
|
||||
* @param ids 需要删除的磁盘监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoById(Long id);
|
||||
/**
|
||||
* 批量新增磁盘监控信息
|
||||
*
|
||||
* @param list 磁盘监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialDiskInfo(List<InitialDiskInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDockerInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialDockerInfoService
|
||||
{
|
||||
/**
|
||||
* 查询容器监控信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
public InitialDockerInfo selectInitialDockerInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 容器监控信息集合
|
||||
*/
|
||||
public List<InitialDockerInfo> selectInitialDockerInfoList(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 批量删除容器监控信息
|
||||
*
|
||||
* @param ids 需要删除的容器监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除容器监控信息信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialDockerInfo(List<InitialDockerInfo> initialDockerInfo);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMemoryInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 内存监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialMemoryInfoService
|
||||
{
|
||||
/**
|
||||
* 查询内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
public InitialMemoryInfo selectInitialMemoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 内存监控信息集合
|
||||
*/
|
||||
public List<InitialMemoryInfo> selectInitialMemoryInfoList(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 批量删除内存监控信息
|
||||
*
|
||||
* @param ids 需要删除的内存监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除内存监控信息信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoById(Long id);
|
||||
/**
|
||||
* 批量新增内存监控信息
|
||||
*
|
||||
* @param list 内存监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMemoryInfo(List<InitialMemoryInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialMountPointInfoService
|
||||
{
|
||||
/**
|
||||
* 查询挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
public InitialMountPointInfo selectInitialMountPointInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 挂载点监控信息集合
|
||||
*/
|
||||
public List<InitialMountPointInfo> selectInitialMountPointInfoList(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 新增挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 修改挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 批量删除挂载点监控信息
|
||||
*
|
||||
* @param ids 需要删除的挂载点监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除挂载点监控信息信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoById(Long id);
|
||||
/**
|
||||
* 批量新增挂载点监控信息
|
||||
*
|
||||
* @param list 挂载点监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMountPointInfo(@Param("list") List<InitialMountPointInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialSwitchInfoService
|
||||
{
|
||||
/**
|
||||
* 查询交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
public InitialSwitchInfo selectInitialSwitchInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 交换机流量监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfo> selectInitialSwitchInfoList(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 批量删除交换机流量监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机流量监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoById(Long id);
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfo(List<InitialSwitchInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public interface IInitialSwitchInfoTempService
|
||||
{
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
public InitialSwitchInfoTemp selectInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 交换机监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfoTemp> selectInitialSwitchInfoTempList(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfoTemp(List<InitialSwitchInfo> list);
|
||||
|
||||
void truncateSwitchInfoTemp();
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSystemInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialSystemInfoService
|
||||
{
|
||||
/**
|
||||
* 查询系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
public InitialSystemInfo selectInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 系统监控信息集合
|
||||
*/
|
||||
public List<InitialSystemInfo> selectInitialSystemInfoList(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 批量删除系统监控信息
|
||||
*
|
||||
* @param ids 需要删除的系统监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除系统监控信息信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSystemInfo(List<InitialSystemInfo> initialSystemInfo);
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialCpuInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialCpuInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialCpuInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CPU监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialCpuInfoServiceImpl implements IInitialCpuInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialCpuInfoMapper initialCpuInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialCpuInfo selectInitialCpuInfoById(Long id)
|
||||
{
|
||||
return initialCpuInfoMapper.selectInitialCpuInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialCpuInfo> selectInitialCpuInfoList(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
return initialCpuInfoMapper.selectInitialCpuInfoList(initialCpuInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialCpuInfo(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
initialCpuInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialCpuInfoMapper.insertInitialCpuInfo(initialCpuInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialCpuInfo(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
initialCpuInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialCpuInfoMapper.updateInitialCpuInfo(initialCpuInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除CPU监控信息
|
||||
*
|
||||
* @param ids 需要删除的CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialCpuInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialCpuInfoMapper.deleteInitialCpuInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialCpuInfoById(Long id)
|
||||
{
|
||||
return initialCpuInfoMapper.deleteInitialCpuInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增CPU监控信息信息
|
||||
*
|
||||
* @param list CPU监控信息信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialCpuInfo(List<InitialCpuInfo> list) {
|
||||
try {
|
||||
return initialCpuInfoMapper.batchInsertInitialCpuInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入CPU信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialDiskInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialDiskInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialDiskInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialDiskInfoServiceImpl implements IInitialDiskInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialDiskInfoMapper initialDiskInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialDiskInfo selectInitialDiskInfoById(Long id)
|
||||
{
|
||||
return initialDiskInfoMapper.selectInitialDiskInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialDiskInfo> selectInitialDiskInfoList(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
return initialDiskInfoMapper.selectInitialDiskInfoList(initialDiskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialDiskInfo(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
initialDiskInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialDiskInfoMapper.insertInitialDiskInfo(initialDiskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialDiskInfo(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
initialDiskInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialDiskInfoMapper.updateInitialDiskInfo(initialDiskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除磁盘监控信息
|
||||
*
|
||||
* @param ids 需要删除的磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDiskInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialDiskInfoMapper.deleteInitialDiskInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDiskInfoById(Long id)
|
||||
{
|
||||
return initialDiskInfoMapper.deleteInitialDiskInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增磁盘监控信息
|
||||
*
|
||||
* @param list 磁盘监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialDiskInfo(List<InitialDiskInfo> list) {
|
||||
try {
|
||||
return initialDiskInfoMapper.batchInsertInitialDiskInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入磁盘信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialDockerInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialDockerInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialDockerInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialDockerInfoServiceImpl implements IInitialDockerInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialDockerInfoMapper initialDockerInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询容器监控信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialDockerInfo selectInitialDockerInfoById(Long id)
|
||||
{
|
||||
return initialDockerInfoMapper.selectInitialDockerInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialDockerInfo> selectInitialDockerInfoList(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
return initialDockerInfoMapper.selectInitialDockerInfoList(initialDockerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialDockerInfo(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
initialDockerInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialDockerInfoMapper.insertInitialDockerInfo(initialDockerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialDockerInfo(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
initialDockerInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialDockerInfoMapper.updateInitialDockerInfo(initialDockerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除容器监控信息
|
||||
*
|
||||
* @param ids 需要删除的容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDockerInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialDockerInfoMapper.deleteInitialDockerInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除容器监控信息信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDockerInfoById(Long id)
|
||||
{
|
||||
return initialDockerInfoMapper.deleteInitialDockerInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialDockerInfo(List<InitialDockerInfo> initialDockerInfo){
|
||||
try {
|
||||
return initialDockerInfoMapper.batchInsertInitialDockerInfo(initialDockerInfo);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入Docker信息失败,失败数量:{}", initialDockerInfo.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialMemoryInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialMemoryInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialMemoryInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 内存监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialMemoryInfoServiceImpl implements IInitialMemoryInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialMemoryInfoMapper initialMemoryInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialMemoryInfo selectInitialMemoryInfoById(Long id)
|
||||
{
|
||||
return initialMemoryInfoMapper.selectInitialMemoryInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialMemoryInfo> selectInitialMemoryInfoList(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
return initialMemoryInfoMapper.selectInitialMemoryInfoList(initialMemoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
initialMemoryInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialMemoryInfoMapper.insertInitialMemoryInfo(initialMemoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
initialMemoryInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialMemoryInfoMapper.updateInitialMemoryInfo(initialMemoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除内存监控信息
|
||||
*
|
||||
* @param ids 需要删除的内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMemoryInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialMemoryInfoMapper.deleteInitialMemoryInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除内存监控信息信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMemoryInfoById(Long id)
|
||||
{
|
||||
return initialMemoryInfoMapper.deleteInitialMemoryInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增内存监控信息
|
||||
*
|
||||
* @param list 内存监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialMemoryInfo(List<InitialMemoryInfo> list) {
|
||||
try {
|
||||
return initialMemoryInfoMapper.batchInsertInitialMemoryInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入内存信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialMountPointInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialMountPointInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialMountPointInfoServiceImpl implements IInitialMountPointInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialMountPointInfoMapper initialMountPointInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialMountPointInfo selectInitialMountPointInfoById(Long id)
|
||||
{
|
||||
return initialMountPointInfoMapper.selectInitialMountPointInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialMountPointInfo> selectInitialMountPointInfoList(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
return initialMountPointInfoMapper.selectInitialMountPointInfoList(initialMountPointInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
initialMountPointInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialMountPointInfoMapper.insertInitialMountPointInfo(initialMountPointInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
initialMountPointInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialMountPointInfoMapper.updateInitialMountPointInfo(initialMountPointInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除挂载点监控信息
|
||||
*
|
||||
* @param ids 需要删除的挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMountPointInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialMountPointInfoMapper.deleteInitialMountPointInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除挂载点监控信息信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMountPointInfoById(Long id)
|
||||
{
|
||||
return initialMountPointInfoMapper.deleteInitialMountPointInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增挂载点监控信息
|
||||
*
|
||||
* @param list 挂载点监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialMountPointInfo(List<InitialMountPointInfo> list) {
|
||||
try {
|
||||
return initialMountPointInfoMapper.batchInsertInitialMountPointInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入挂载点信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialSwitchInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialSwitchInfoServiceImpl implements IInitialSwitchInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialSwitchInfoMapper initialSwitchInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialSwitchInfo selectInitialSwitchInfoById(Long id)
|
||||
{
|
||||
return initialSwitchInfoMapper.selectInitialSwitchInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSwitchInfo> selectInitialSwitchInfoList(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
return initialSwitchInfoMapper.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
initialSwitchInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoMapper.insertInitialSwitchInfo(initialSwitchInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
initialSwitchInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoMapper.updateInitialSwitchInfo(initialSwitchInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交换机流量监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialSwitchInfoMapper.deleteInitialSwitchInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoById(Long id)
|
||||
{
|
||||
return initialSwitchInfoMapper.deleteInitialSwitchInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialSwitchInfo(List<InitialSwitchInfo> list) {
|
||||
try {
|
||||
return initialSwitchInfoMapper.batchInsertInitialSwitchInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入交换机信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
import com.ruoyi.rocketmq.mapper.InitialSwitchInfoTempMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoTempService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialSwitchInfoTempServiceImpl implements IInitialSwitchInfoTempService
|
||||
{
|
||||
@Autowired
|
||||
private InitialSwitchInfoTempMapper initialSwitchInfoTempMapper;
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialSwitchInfoTemp selectInitialSwitchInfoTempById(Long id)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.selectInitialSwitchInfoTempById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSwitchInfoTemp> selectInitialSwitchInfoTempList(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.selectInitialSwitchInfoTempList(initialSwitchInfoTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
initialSwitchInfoTemp.setCreateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoTempMapper.insertInitialSwitchInfoTemp(initialSwitchInfoTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
initialSwitchInfoTemp.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoTempMapper.updateInitialSwitchInfoTemp(initialSwitchInfoTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoTempByIds(Long[] ids)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.deleteInitialSwitchInfoTempByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoTempById(Long id)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.deleteInitialSwitchInfoTempById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialSwitchInfoTemp(List<InitialSwitchInfo> list) {
|
||||
try {
|
||||
return initialSwitchInfoTempMapper.batchInsertInitialSwitchInfoTemp(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入交换机信息临时表失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void truncateSwitchInfoTemp() {
|
||||
initialSwitchInfoTempMapper.truncateSwitchInfoTemp();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialSystemInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialSystemInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialSystemInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialSystemInfoServiceImpl implements IInitialSystemInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialSystemInfoMapper initialSystemInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialSystemInfo selectInitialSystemInfoById(Long id)
|
||||
{
|
||||
return initialSystemInfoMapper.selectInitialSystemInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSystemInfo> selectInitialSystemInfoList(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
return initialSystemInfoMapper.selectInitialSystemInfoList(initialSystemInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialSystemInfo(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
initialSystemInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialSystemInfoMapper.insertInitialSystemInfo(initialSystemInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialSystemInfo(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
initialSystemInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialSystemInfoMapper.updateInitialSystemInfo(initialSystemInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除系统监控信息
|
||||
*
|
||||
* @param ids 需要删除的系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSystemInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialSystemInfoMapper.deleteInitialSystemInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统监控信息信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSystemInfoById(Long id)
|
||||
{
|
||||
return initialSystemInfoMapper.deleteInitialSystemInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int batchInsertInitialSystemInfo(List<InitialSystemInfo> initialSystemInfo)
|
||||
{
|
||||
try {
|
||||
return initialSystemInfoMapper.batchInsertInitialSystemInfo(initialSystemInfo);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入挂载点信息失败,失败数量:{}", initialSystemInfo.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ruoyi.rocketmq.utils;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class JsonDataParser {
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
/**
|
||||
* 通用JSON解析方法(兼容对象和数组)
|
||||
* @param jsonStr JSON字符串
|
||||
* @param valueType 目标实体类类型
|
||||
* @return 实体类List集合
|
||||
*/
|
||||
public static <T> List<T> parseJsonData(String jsonStr, Class<T> valueType) {
|
||||
if (!StringUtils.hasText(jsonStr)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
try {
|
||||
JsonNode rootNode = objectMapper.readTree(jsonStr);
|
||||
|
||||
if (rootNode.isArray()) {
|
||||
// 处理数组格式JSON
|
||||
return objectMapper.readValue(jsonStr,
|
||||
objectMapper.getTypeFactory().constructCollectionType(List.class, valueType));
|
||||
} else {
|
||||
// 处理单个对象格式JSON
|
||||
List<T> result = new ArrayList<>(1);
|
||||
result.add(objectMapper.readValue(jsonStr, valueType));
|
||||
return result;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("JSON解析失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialCpuInfoMapper">
|
||||
|
||||
<resultMap type="InitialCpuInfo" id="InitialCpuInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="avg1" column="avg1" />
|
||||
<result property="avg5" column="avg5" />
|
||||
<result property="avg15" column="avg15" />
|
||||
<result property="interrupt" column="interrupt" />
|
||||
<result property="uti" column="uti" />
|
||||
<result property="num" column="num" />
|
||||
<result property="normal" column="normal" />
|
||||
<result property="idle" column="idle" />
|
||||
<result property="iowait" column="iowait" />
|
||||
<result property="system" column="system" />
|
||||
<result property="noresp" column="noresp" />
|
||||
<result property="user" column="user" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialCpuInfoVo">
|
||||
select id, client_id, avg1, avg5, avg15, interrupt, uti, num, normal, idle, iowait, system, noresp, user, create_by, update_by, create_time, update_time from initial_cpu_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialCpuInfoList" parameterType="InitialCpuInfo" resultMap="InitialCpuInfoResult">
|
||||
<include refid="selectInitialCpuInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="avg1 != null "> and avg1 = #{avg1}</if>
|
||||
<if test="avg5 != null "> and avg5 = #{avg5}</if>
|
||||
<if test="avg15 != null "> and avg15 = #{avg15}</if>
|
||||
<if test="interrupt != null "> and interrupt = #{interrupt}</if>
|
||||
<if test="uti != null "> and uti = #{uti}</if>
|
||||
<if test="num != null "> and num = #{num}</if>
|
||||
<if test="normal != null "> and normal = #{normal}</if>
|
||||
<if test="idle != null "> and idle = #{idle}</if>
|
||||
<if test="iowait != null "> and iowait = #{iowait}</if>
|
||||
<if test="system != null "> and system = #{system}</if>
|
||||
<if test="noresp != null "> and noresp = #{noresp}</if>
|
||||
<if test="user != null "> and user = #{user}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialCpuInfoById" parameterType="Long" resultMap="InitialCpuInfoResult">
|
||||
<include refid="selectInitialCpuInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialCpuInfo" parameterType="InitialCpuInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_cpu_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="avg1 != null">avg1,</if>
|
||||
<if test="avg5 != null">avg5,</if>
|
||||
<if test="avg15 != null">avg15,</if>
|
||||
<if test="interrupt != null">interrupt,</if>
|
||||
<if test="uti != null">uti,</if>
|
||||
<if test="num != null">num,</if>
|
||||
<if test="normal != null">normal,</if>
|
||||
<if test="idle != null">idle,</if>
|
||||
<if test="iowait != null">iowait,</if>
|
||||
<if test="system != null">system,</if>
|
||||
<if test="noresp != null">noresp,</if>
|
||||
<if test="user != null">user,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="avg1 != null">#{avg1},</if>
|
||||
<if test="avg5 != null">#{avg5},</if>
|
||||
<if test="avg15 != null">#{avg15},</if>
|
||||
<if test="interrupt != null">#{interrupt},</if>
|
||||
<if test="uti != null">#{uti},</if>
|
||||
<if test="num != null">#{num},</if>
|
||||
<if test="normal != null">#{normal},</if>
|
||||
<if test="idle != null">#{idle},</if>
|
||||
<if test="iowait != null">#{iowait},</if>
|
||||
<if test="system != null">#{system},</if>
|
||||
<if test="noresp != null">#{noresp},</if>
|
||||
<if test="user != null">#{user},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialCpuInfo" parameterType="InitialCpuInfo">
|
||||
update initial_cpu_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="avg1 != null">avg1 = #{avg1},</if>
|
||||
<if test="avg5 != null">avg5 = #{avg5},</if>
|
||||
<if test="avg15 != null">avg15 = #{avg15},</if>
|
||||
<if test="interrupt != null">interrupt = #{interrupt},</if>
|
||||
<if test="uti != null">uti = #{uti},</if>
|
||||
<if test="num != null">num = #{num},</if>
|
||||
<if test="normal != null">normal = #{normal},</if>
|
||||
<if test="idle != null">idle = #{idle},</if>
|
||||
<if test="iowait != null">iowait = #{iowait},</if>
|
||||
<if test="system != null">system = #{system},</if>
|
||||
<if test="noresp != null">noresp = #{noresp},</if>
|
||||
<if test="user != null">user = #{user},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialCpuInfoById" parameterType="Long">
|
||||
delete from initial_cpu_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialCpuInfoByIds" parameterType="String">
|
||||
delete from initial_cpu_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialCpuInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_cpu_info
|
||||
(
|
||||
client_id,
|
||||
avg1,
|
||||
avg5,
|
||||
avg15,
|
||||
interrupt,
|
||||
uti,
|
||||
num,
|
||||
normal,
|
||||
idle,
|
||||
iowait,
|
||||
`system`,
|
||||
noresp,
|
||||
`user`,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.avg1},
|
||||
#{item.avg5},
|
||||
#{item.avg15},
|
||||
#{item.interrupt},
|
||||
#{item.uti},
|
||||
#{item.num},
|
||||
#{item.normal},
|
||||
#{item.idle},
|
||||
#{item.iowait},
|
||||
#{item.system},
|
||||
#{item.noresp},
|
||||
#{item.user},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialDiskInfoMapper">
|
||||
|
||||
<resultMap type="InitialDiskInfo" id="InitialDiskInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="serial" column="serial" />
|
||||
<result property="total" column="total" />
|
||||
<result property="writeSpeed" column="write_speed" />
|
||||
<result property="readSpeed" column="read_speed" />
|
||||
<result property="writeTimes" column="write_times" />
|
||||
<result property="readTimes" column="read_times" />
|
||||
<result property="writeBytes" column="write_bytes" />
|
||||
<result property="readBytes" column="read_bytes" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialDiskInfoVo">
|
||||
select id, client_id, name, serial, total, write_speed, read_speed, write_times, read_times, write_bytes, read_bytes, create_by, update_by, create_time, update_time from initial_disk_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialDiskInfoList" parameterType="InitialDiskInfo" resultMap="InitialDiskInfoResult">
|
||||
<include refid="selectInitialDiskInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="serial != null and serial != ''"> and serial = #{serial}</if>
|
||||
<if test="total != null "> and total = #{total}</if>
|
||||
<if test="writeSpeed != null "> and write_speed = #{writeSpeed}</if>
|
||||
<if test="readSpeed != null "> and read_speed = #{readSpeed}</if>
|
||||
<if test="writeTimes != null "> and write_times = #{writeTimes}</if>
|
||||
<if test="readTimes != null "> and read_times = #{readTimes}</if>
|
||||
<if test="writeBytes != null "> and write_bytes = #{writeBytes}</if>
|
||||
<if test="readBytes != null "> and read_bytes = #{readBytes}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialDiskInfoById" parameterType="Long" resultMap="InitialDiskInfoResult">
|
||||
<include refid="selectInitialDiskInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialDiskInfo" parameterType="InitialDiskInfo">
|
||||
insert into initial_disk_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="serial != null">serial,</if>
|
||||
<if test="total != null">total,</if>
|
||||
<if test="writeSpeed != null">write_speed,</if>
|
||||
<if test="readSpeed != null">read_speed,</if>
|
||||
<if test="writeTimes != null">write_times,</if>
|
||||
<if test="readTimes != null">read_times,</if>
|
||||
<if test="writeBytes != null">write_bytes,</if>
|
||||
<if test="readBytes != null">read_bytes,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="serial != null">#{serial},</if>
|
||||
<if test="total != null">#{total},</if>
|
||||
<if test="writeSpeed != null">#{writeSpeed},</if>
|
||||
<if test="readSpeed != null">#{readSpeed},</if>
|
||||
<if test="writeTimes != null">#{writeTimes},</if>
|
||||
<if test="readTimes != null">#{readTimes},</if>
|
||||
<if test="writeBytes != null">#{writeBytes},</if>
|
||||
<if test="readBytes != null">#{readBytes},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialDiskInfo" parameterType="InitialDiskInfo">
|
||||
update initial_disk_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="serial != null">serial = #{serial},</if>
|
||||
<if test="total != null">total = #{total},</if>
|
||||
<if test="writeSpeed != null">write_speed = #{writeSpeed},</if>
|
||||
<if test="readSpeed != null">read_speed = #{readSpeed},</if>
|
||||
<if test="writeTimes != null">write_times = #{writeTimes},</if>
|
||||
<if test="readTimes != null">read_times = #{readTimes},</if>
|
||||
<if test="writeBytes != null">write_bytes = #{writeBytes},</if>
|
||||
<if test="readBytes != null">read_bytes = #{readBytes},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialDiskInfoById" parameterType="Long">
|
||||
delete from initial_disk_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialDiskInfoByIds" parameterType="String">
|
||||
delete from initial_disk_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialDiskInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_disk_info
|
||||
(
|
||||
id,
|
||||
client_id,
|
||||
`name`,
|
||||
serial,
|
||||
total,
|
||||
write_speed,
|
||||
read_speed,
|
||||
write_times,
|
||||
read_times,
|
||||
write_bytes,
|
||||
read_bytes,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.clientId},
|
||||
#{item.name},
|
||||
#{item.serial},
|
||||
#{item.total},
|
||||
#{item.writeSpeed},
|
||||
#{item.readSpeed},
|
||||
#{item.writeTimes},
|
||||
#{item.readTimes},
|
||||
#{item.writeBytes},
|
||||
#{item.readBytes},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialDockerInfoMapper">
|
||||
|
||||
<resultMap type="InitialDockerInfo" id="InitialDockerInfoResult">
|
||||
<result property="autoId" column="auto_id" />
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="cpuUtil" column="cpu_util" />
|
||||
<result property="memUtil" column="mem_util" />
|
||||
<result property="netInSpeed" column="net_in_speed" />
|
||||
<result property="netOutSpeed" column="net_out_speed" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialDockerInfoVo">
|
||||
select auto_id, id, name, status, cpu_util, mem_util, net_in_speed, net_out_speed, client_id, create_time, update_time, create_by, update_by from initial_docker_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialDockerInfoList" parameterType="InitialDockerInfo" resultMap="InitialDockerInfoResult">
|
||||
<include refid="selectInitialDockerInfoVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="cpuUtil != null and cpuUtil != ''"> and cpu_util = #{cpuUtil}</if>
|
||||
<if test="memUtil != null and memUtil != ''"> and mem_util = #{memUtil}</if>
|
||||
<if test="netInSpeed != null and netInSpeed != ''"> and net_in_speed = #{netInSpeed}</if>
|
||||
<if test="netOutSpeed != null and netOutSpeed != ''"> and net_out_speed = #{netOutSpeed}</if>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialDockerInfoById" parameterType="Long" resultMap="InitialDockerInfoResult">
|
||||
<include refid="selectInitialDockerInfoVo"/>
|
||||
where auto_id = #{autoId}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialDockerInfo" parameterType="InitialDockerInfo" useGeneratedKeys="true" keyProperty="auto_id">
|
||||
insert into initial_docker_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="cpuUtil != null">cpu_util,</if>
|
||||
<if test="memUtil != null">mem_util,</if>
|
||||
<if test="netInSpeed != null">net_in_speed,</if>
|
||||
<if test="netOutSpeed != null">net_out_speed,</if>
|
||||
<if test="clientId != null">client_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="cpuUtil != null">#{cpuUtil},</if>
|
||||
<if test="memUtil != null">#{memUtil},</if>
|
||||
<if test="netInSpeed != null">#{netInSpeed},</if>
|
||||
<if test="netOutSpeed != null">#{netOutSpeed},</if>
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialDockerInfo" parameterType="InitialDockerInfo">
|
||||
update initial_docker_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id = #{id},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="cpuUtil != null">cpu_util = #{cpuUtil},</if>
|
||||
<if test="memUtil != null">mem_util = #{memUtil},</if>
|
||||
<if test="netInSpeed != null">net_in_speed = #{netInSpeed},</if>
|
||||
<if test="netOutSpeed != null">net_out_speed = #{netOutSpeed},</if>
|
||||
<if test="clientId != null">client_id = #{clientId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialDockerInfoById" parameterType="Long">
|
||||
delete from initial_docker_info where auto_id = #{autoId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialDockerInfoByIds" parameterType="String">
|
||||
delete from initial_docker_info where auto_id in
|
||||
<foreach item="autoId" collection="array" open="(" separator="," close=")">
|
||||
#{autoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialDockerInfo" parameterType="java.util.List">
|
||||
INSERT INTO initial_docker_info
|
||||
(
|
||||
`id`,
|
||||
`name`,
|
||||
status,
|
||||
cpu_util,
|
||||
mem_util,
|
||||
net_in_speed,
|
||||
net_out_speed,
|
||||
client_id,
|
||||
create_time,
|
||||
update_time,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.name},
|
||||
#{item.status},
|
||||
#{item.cpuUtil},
|
||||
#{item.memUtil},
|
||||
#{item.netInSpeed},
|
||||
#{item.netOutSpeed},
|
||||
#{item.clientId},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
#{item.createBy},
|
||||
#{item.updateBy}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialMemoryInfoMapper">
|
||||
|
||||
<resultMap type="InitialMemoryInfo" id="InitialMemoryInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="swapSizeFree" column="swap_size_free" />
|
||||
<result property="untilzation" column="untilzation" />
|
||||
<result property="swapSizePercent" column="swap_size_percent" />
|
||||
<result property="available" column="available" />
|
||||
<result property="percent" column="percent" />
|
||||
<result property="total" column="total" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialMemoryInfoVo">
|
||||
select id, client_id, swap_size_free, untilzation, swap_size_percent, available, percent, total, create_by, update_by, create_time, update_time from initial_memory_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialMemoryInfoList" parameterType="InitialMemoryInfo" resultMap="InitialMemoryInfoResult">
|
||||
<include refid="selectInitialMemoryInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="swapSizeFree != null "> and swap_size_free = #{swapSizeFree}</if>
|
||||
<if test="untilzation != null "> and untilzation = #{untilzation}</if>
|
||||
<if test="swapSizePercent != null "> and swap_size_percent = #{swapSizePercent}</if>
|
||||
<if test="available != null "> and available = #{available}</if>
|
||||
<if test="percent != null "> and percent = #{percent}</if>
|
||||
<if test="total != null "> and total = #{total}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialMemoryInfoById" parameterType="Long" resultMap="InitialMemoryInfoResult">
|
||||
<include refid="selectInitialMemoryInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialMemoryInfo" parameterType="InitialMemoryInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_memory_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="swapSizeFree != null">swap_size_free,</if>
|
||||
<if test="untilzation != null">untilzation,</if>
|
||||
<if test="swapSizePercent != null">swap_size_percent,</if>
|
||||
<if test="available != null">available,</if>
|
||||
<if test="percent != null">percent,</if>
|
||||
<if test="total != null">total,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="swapSizeFree != null">#{swapSizeFree},</if>
|
||||
<if test="untilzation != null">#{untilzation},</if>
|
||||
<if test="swapSizePercent != null">#{swapSizePercent},</if>
|
||||
<if test="available != null">#{available},</if>
|
||||
<if test="percent != null">#{percent},</if>
|
||||
<if test="total != null">#{total},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialMemoryInfo" parameterType="InitialMemoryInfo">
|
||||
update initial_memory_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="swapSizeFree != null">swap_size_free = #{swapSizeFree},</if>
|
||||
<if test="untilzation != null">untilzation = #{untilzation},</if>
|
||||
<if test="swapSizePercent != null">swap_size_percent = #{swapSizePercent},</if>
|
||||
<if test="available != null">available = #{available},</if>
|
||||
<if test="percent != null">percent = #{percent},</if>
|
||||
<if test="total != null">total = #{total},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialMemoryInfoById" parameterType="Long">
|
||||
delete from initial_memory_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialMemoryInfoByIds" parameterType="String">
|
||||
delete from initial_memory_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialMemoryInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_memory_info
|
||||
(
|
||||
client_id,
|
||||
swap_size_free,
|
||||
untilzation,
|
||||
swap_size_percent,
|
||||
available,
|
||||
percent,
|
||||
total,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.swapSizeFree},
|
||||
#{item.untilzation},
|
||||
#{item.swapSizePercent},
|
||||
#{item.available},
|
||||
#{item.percent},
|
||||
#{item.total},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialMountPointInfoMapper">
|
||||
|
||||
<resultMap type="InitialMountPointInfo" id="InitialMountPointInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="mount" column="mount" />
|
||||
<result property="vfsType" column="vfs_type" />
|
||||
<result property="vfsFree" column="vfs_free" />
|
||||
<result property="vfsTotal" column="vfs_total" />
|
||||
<result property="vfsUtil" column="vfs_util" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialMountPointInfoVo">
|
||||
select id, client_id, mount, vfs_type, vfs_free, vfs_total, vfs_util, create_by, update_by, create_time, update_time from initial_mount_point_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialMountPointInfoList" parameterType="InitialMountPointInfo" resultMap="InitialMountPointInfoResult">
|
||||
<include refid="selectInitialMountPointInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="mount != null and mount != ''"> and mount = #{mount}</if>
|
||||
<if test="vfsType != null and vfsType != ''"> and vfs_type = #{vfsType}</if>
|
||||
<if test="vfsFree != null "> and vfs_free = #{vfsFree}</if>
|
||||
<if test="vfsTotal != null "> and vfs_total = #{vfsTotal}</if>
|
||||
<if test="vfsUtil != null "> and vfs_util = #{vfsUtil}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialMountPointInfoById" parameterType="Long" resultMap="InitialMountPointInfoResult">
|
||||
<include refid="selectInitialMountPointInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialMountPointInfo" parameterType="InitialMountPointInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_mount_point_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="mount != null and mount != ''">mount,</if>
|
||||
<if test="vfsType != null">vfs_type,</if>
|
||||
<if test="vfsFree != null">vfs_free,</if>
|
||||
<if test="vfsTotal != null">vfs_total,</if>
|
||||
<if test="vfsUtil != null">vfs_util,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="mount != null and mount != ''">#{mount},</if>
|
||||
<if test="vfsType != null">#{vfsType},</if>
|
||||
<if test="vfsFree != null">#{vfsFree},</if>
|
||||
<if test="vfsTotal != null">#{vfsTotal},</if>
|
||||
<if test="vfsUtil != null">#{vfsUtil},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialMountPointInfo" parameterType="InitialMountPointInfo">
|
||||
update initial_mount_point_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="mount != null and mount != ''">mount = #{mount},</if>
|
||||
<if test="vfsType != null">vfs_type = #{vfsType},</if>
|
||||
<if test="vfsFree != null">vfs_free = #{vfsFree},</if>
|
||||
<if test="vfsTotal != null">vfs_total = #{vfsTotal},</if>
|
||||
<if test="vfsUtil != null">vfs_util = #{vfsUtil},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialMountPointInfoById" parameterType="Long">
|
||||
delete from initial_mount_point_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialMountPointInfoByIds" parameterType="String">
|
||||
delete from initial_mount_point_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialMountPointInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_mount_point_info
|
||||
(
|
||||
client_id,
|
||||
mount,
|
||||
vfs_type,
|
||||
vfs_free,
|
||||
vfs_total,
|
||||
vfs_util,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.mount},
|
||||
#{item.vfsType},
|
||||
#{item.vfsFree},
|
||||
#{item.vfsTotal},
|
||||
#{item.vfsUtil},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialSwitchInfoMapper">
|
||||
|
||||
<resultMap type="InitialSwitchInfo" id="InitialSwitchInfoResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="clientId" column="client_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="inBytes" column="in_bytes"/>
|
||||
<result property="outBytes" column="out_bytes"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="inSpeed" column="in_speed"/>
|
||||
<result property="outSpeed" column="out_speed"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoVo">
|
||||
SELECT
|
||||
id, client_id, `name`, in_bytes, out_bytes, status, `type`,
|
||||
in_speed, out_speed, create_by, update_by, create_time, update_time
|
||||
FROM initial_switch_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoList" parameterType="InitialSwitchInfo" resultMap="InitialSwitchInfoResult">
|
||||
<include refid="selectInitialSwitchInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''">
|
||||
AND client_id = #{clientId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND name LIKE CONCAT('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''">
|
||||
AND create_time >= #{params.beginTime}
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''">
|
||||
AND create_time <= #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSwitchInfoById" parameterType="Long" resultMap="InitialSwitchInfoResult">
|
||||
<include refid="selectInitialSwitchInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialSwitchInfo" parameterType="InitialSwitchInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_switch_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
client_id,
|
||||
<if test="name != null">name,</if>
|
||||
<if test="inBytes != null">in_bytes,</if>
|
||||
<if test="outBytes != null">out_bytes,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSeppd != null">out_speed,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
create_time,
|
||||
update_time
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
#{clientId},
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="inBytes != null">#{inBytes},</if>
|
||||
<if test="outBytes != null">#{outBytes},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSeppd != null">#{outSpeed},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
NOW(),
|
||||
NOW()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialSwitchInfo" parameterType="InitialSwitchInfo">
|
||||
UPDATE initial_switch_info
|
||||
<set>
|
||||
<if test="clientId != null">client_id = #{clientId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="inBytes != null">in_bytes = #{inBytes},</if>
|
||||
<if test="outBytes != null">out_bytes = #{outBytes},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed}</if>
|
||||
<if test="outSeppd != null">out_speed = #{outSpeed}</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoById" parameterType="Long">
|
||||
delete from initial_switch_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoByIds" parameterType="String">
|
||||
delete from initial_switch_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialSwitchInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_switch_info
|
||||
(
|
||||
client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed,
|
||||
create_by, update_by, create_time, update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId}, #{item.name}, #{item.inBytes}, #{item.outBytes},
|
||||
#{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.createBy}, #{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialSwitchInfoTempMapper">
|
||||
|
||||
<resultMap type="InitialSwitchInfoTemp" id="InitialSwitchInfoTempResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="inBytes" column="in_bytes" />
|
||||
<result property="outBytes" column="out_bytes" />
|
||||
<result property="status" column="status" />
|
||||
<result property="type" column="type" />
|
||||
<result property="inSpeed" column="in_speed" />
|
||||
<result property="outSpeed" column="out_speed" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoTempVo">
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, create_by, update_by, create_time, update_time from initial_switch_info_temp
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoTempList" parameterType="InitialSwitchInfoTemp" resultMap="InitialSwitchInfoTempResult">
|
||||
<include refid="selectInitialSwitchInfoTempVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="inBytes != null "> and in_bytes = #{inBytes}</if>
|
||||
<if test="outBytes != null "> and out_bytes = #{outBytes}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="inSpeed != null "> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null "> and out_speed = #{outSpeed}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSwitchInfoTempById" parameterType="Long" resultMap="InitialSwitchInfoTempResult">
|
||||
<include refid="selectInitialSwitchInfoTempVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialSwitchInfoTemp" parameterType="InitialSwitchInfoTemp" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_switch_info_temp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="inBytes != null">in_bytes,</if>
|
||||
<if test="outBytes != null">out_bytes,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSpeed != null">out_speed,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="inBytes != null">#{inBytes},</if>
|
||||
<if test="outBytes != null">#{outBytes},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSpeed != null">#{outSpeed},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialSwitchInfoTemp" parameterType="InitialSwitchInfoTemp">
|
||||
update initial_switch_info_temp
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="inBytes != null">in_bytes = #{inBytes},</if>
|
||||
<if test="outBytes != null">out_bytes = #{outBytes},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
|
||||
<if test="outSpeed != null">out_speed = #{outSpeed},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoTempById" parameterType="Long">
|
||||
delete from initial_switch_info_temp where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoTempByIds" parameterType="String">
|
||||
delete from initial_switch_info_temp where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<insert id="batchInsertInitialSwitchInfoTemp" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_switch_info_temp
|
||||
(
|
||||
client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed,
|
||||
create_by, update_by, create_time, update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId}, #{item.name}, #{item.inBytes}, #{item.outBytes},
|
||||
#{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.createBy}, #{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="truncateSwitchInfoTemp">
|
||||
truncate table initial_switch_info_temp
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.rocketmq.mapper.InitialSystemInfoMapper">
|
||||
|
||||
<resultMap type="InitialSystemInfo" id="InitialSystemInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="os" column="os" />
|
||||
<result property="arch" column="arch" />
|
||||
<result property="maxProc" column="max_proc" />
|
||||
<result property="runProcNum" column="run_proc_num" />
|
||||
<result property="usersNum" column="users_num" />
|
||||
<result property="diskSizeTotal" column="disk_size_total" />
|
||||
<result property="bootTime" column="boot_time" />
|
||||
<result property="uname" column="uname" />
|
||||
<result property="localTime" column="local_time" />
|
||||
<result property="upTime" column="up_time" />
|
||||
<result property="procNum" column="proc_num" />
|
||||
<result property="timeStamp" column="time_stamp" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="uuid" column="uuid" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSystemInfoVo">
|
||||
select id, client_id, os, arch, max_proc, run_proc_num, users_num, disk_size_total, boot_time, uname, local_time, up_time, proc_num, time_stamp, create_by, update_by, create_time, update_time, uuid from initial_system_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSystemInfoList" parameterType="InitialSystemInfo" resultMap="InitialSystemInfoResult">
|
||||
<include refid="selectInitialSystemInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="os != null and os != ''"> and os = #{os}</if>
|
||||
<if test="arch != null and arch != ''"> and arch = #{arch}</if>
|
||||
<if test="maxProc != null "> and max_proc = #{maxProc}</if>
|
||||
<if test="runProcNum != null "> and run_proc_num = #{runProcNum}</if>
|
||||
<if test="usersNum != null "> and users_num = #{usersNum}</if>
|
||||
<if test="diskSizeTotal != null "> and disk_size_total = #{diskSizeTotal}</if>
|
||||
<if test="bootTime != null "> and boot_time = #{bootTime}</if>
|
||||
<if test="uname != null and uname != ''"> and uname like concat('%', #{uname}, '%')</if>
|
||||
<if test="localTime != null and localTime != ''"> and local_time = #{localTime}</if>
|
||||
<if test="upTime != null "> and up_time = #{upTime}</if>
|
||||
<if test="procNum != null "> and proc_num = #{procNum}</if>
|
||||
<if test="timeStamp != null "> and time_stamp = #{timeStamp}</if>
|
||||
<if test="uuid != null "> and uuid = #{uuid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSystemInfoById" parameterType="Long" resultMap="InitialSystemInfoResult">
|
||||
<include refid="selectInitialSystemInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialSystemInfo" parameterType="InitialSystemInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_system_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="os != null">os,</if>
|
||||
<if test="arch != null">arch,</if>
|
||||
<if test="maxProc != null">max_proc,</if>
|
||||
<if test="runProcNum != null">run_proc_num,</if>
|
||||
<if test="usersNum != null">users_num,</if>
|
||||
<if test="diskSizeTotal != null">disk_size_total,</if>
|
||||
<if test="bootTime != null">boot_time,</if>
|
||||
<if test="uname != null">uname,</if>
|
||||
<if test="localTime != null">local_time,</if>
|
||||
<if test="upTime != null">up_time,</if>
|
||||
<if test="procNum != null">proc_num,</if>
|
||||
<if test="timeStamp != null">time_stamp,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="uuid != null">uuid,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="os != null">#{os},</if>
|
||||
<if test="arch != null">#{arch},</if>
|
||||
<if test="maxProc != null">#{maxProc},</if>
|
||||
<if test="runProcNum != null">#{runProcNum},</if>
|
||||
<if test="usersNum != null">#{usersNum},</if>
|
||||
<if test="diskSizeTotal != null">#{diskSizeTotal},</if>
|
||||
<if test="bootTime != null">#{bootTime},</if>
|
||||
<if test="uname != null">#{uname},</if>
|
||||
<if test="localTime != null">#{localTime},</if>
|
||||
<if test="upTime != null">#{upTime},</if>
|
||||
<if test="procNum != null">#{procNum},</if>
|
||||
<if test="timeStamp != null">#{timeStamp},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="uuid != null">#{uuid},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialSystemInfo" parameterType="InitialSystemInfo">
|
||||
update initial_system_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="os != null">os = #{os},</if>
|
||||
<if test="arch != null">arch = #{arch},</if>
|
||||
<if test="maxProc != null">max_proc = #{maxProc},</if>
|
||||
<if test="runProcNum != null">run_proc_num = #{runProcNum},</if>
|
||||
<if test="usersNum != null">users_num = #{usersNum},</if>
|
||||
<if test="diskSizeTotal != null">disk_size_total = #{diskSizeTotal},</if>
|
||||
<if test="bootTime != null">boot_time = #{bootTime},</if>
|
||||
<if test="uname != null">uname = #{uname},</if>
|
||||
<if test="localTime != null">local_time = #{localTime},</if>
|
||||
<if test="upTime != null">up_time = #{upTime},</if>
|
||||
<if test="procNum != null">proc_num = #{procNum},</if>
|
||||
<if test="timeStamp != null">time_stamp = #{timeStamp},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="uuid != null">uuid = #{uuid},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialSystemInfoById" parameterType="Long">
|
||||
delete from initial_system_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialSystemInfoByIds" parameterType="String">
|
||||
delete from initial_system_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<insert id="batchInsertInitialSystemInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_system_info
|
||||
(
|
||||
client_id,
|
||||
os,
|
||||
arch,
|
||||
max_proc,
|
||||
run_proc_num,
|
||||
users_num,
|
||||
disk_size_total,
|
||||
boot_time,
|
||||
uname,
|
||||
local_time,
|
||||
up_time,
|
||||
proc_num,
|
||||
time_stamp,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time,
|
||||
uuid
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.os},
|
||||
#{item.arch},
|
||||
#{item.maxProc},
|
||||
#{item.runProcNum},
|
||||
#{item.usersNum},
|
||||
#{item.diskSizeTotal},
|
||||
#{item.bootTime},
|
||||
#{item.uname},
|
||||
#{item.localTime},
|
||||
#{item.upTime},
|
||||
#{item.procNum},
|
||||
#{item.timeStamp},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
#{item.uuid}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user