初始化v1.2
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.tongran.rocketmq;
|
||||
|
||||
import com.tongran.common.security.annotation.EnableCustomConfig;
|
||||
import com.tongran.common.security.annotation.EnableRyFeignClients;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
/**
|
||||
* 平台管理模块
|
||||
*
|
||||
* @author tongran
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
@EnableAsync
|
||||
public class RocketMQApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(RocketMQApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ RocketMQ模块启动成功 ლ(´ڡ`ლ)゙");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.tongran.rocketmq.config;
|
||||
|
||||
import com.tongran.rocketmq.consumer.RocketMsgListener;
|
||||
import com.tongran.rocketmq.enums.MessageTopic;
|
||||
import com.tongran.rocketmq.model.ConsumerMode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
|
||||
import org.apache.rocketmq.client.exception.MQClientException;
|
||||
import org.apache.rocketmq.common.consumer.ConsumeFromWhere;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消费者配置
|
||||
*/
|
||||
@RefreshScope
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class ConsumerConfig {
|
||||
|
||||
@Autowired
|
||||
private ConsumerMode consumerMode;
|
||||
|
||||
@Autowired
|
||||
private RocketMsgListener rocketMsgListener;
|
||||
|
||||
@Bean
|
||||
public DefaultMQPushConsumer getRocketMQConsumer() {
|
||||
//构建客户端连接
|
||||
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(consumerMode.getAgentGroup());
|
||||
//
|
||||
consumer.setNamesrvAddr(consumerMode.getNamesrvAddr());
|
||||
consumer.setConsumeThreadMin(consumerMode.getConsumeThreadMin());
|
||||
consumer.setConsumeThreadMax(consumerMode.getConsumeThreadMax());
|
||||
consumer.registerMessageListener(rocketMsgListener);
|
||||
/**
|
||||
* 1. CONSUME_FROM_LAST_OFFSET:第一次启动从队列最后位置消费,后续再启动接着上次消费的进度开始消费
|
||||
* 2. CONSUME_FROM_FIRST_OFFSET:第一次启动从队列初始位置消费,后续再启动接着上次消费的进度开始消费
|
||||
* 3. CONSUME_FROM_TIMESTAMP:第一次启动从指定时间点位置消费,后续再启动接着上次消费的进度开始消费
|
||||
* 以上所说的第一次启动是指从来没有消费过的消费者,如果该消费者消费过,那么会在broker端记录该消费者的消费位置,如果该消费者挂了再启动,那么自动从上次消费的进度开始
|
||||
*/
|
||||
consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET);
|
||||
/**
|
||||
* CLUSTERING (集群模式) :默认模式,同一个ConsumerGroup(groupName相同)每个consumer只消费所订阅消息的一部分内容,同一个ConsumerGroup里所有的Consumer消息加起来才是所
|
||||
* 订阅topic整体,从而达到负载均衡的目的
|
||||
* BROADCASTING (广播模式) :同一个ConsumerGroup每个consumer都消费到所订阅topic所有消息,也就是一个消费会被多次分发,被多个consumer消费。
|
||||
* 需要注意的是,在广播模式下,每个Consumer都会独立地处理相同的消息副本。这可能会导致一些潜在的问题,例如消息重复处理或者资源浪费。因此,在使用广播模式时,请确保消息的处理逻辑是幂等的,并仔细考虑系统资源的消耗。
|
||||
*/
|
||||
// consumer.setMessageModel(MessageModel.BROADCASTING);
|
||||
|
||||
consumer.setVipChannelEnabled(false);
|
||||
consumer.setConsumeMessageBatchMaxSize(consumerMode.getConsumeMessageBatchMaxSize());
|
||||
try {
|
||||
/**
|
||||
* 订阅topic,可以对指定消息进行过滤,例如:"TopicTest","tagl||tag2||tag3",*或null表示topic所有消息
|
||||
* 由于官方并没有给直接订阅全部消息示例 所以使用list列表循环订阅所有topic
|
||||
*/
|
||||
// 获取所有topic列表
|
||||
MessageTopic messageTopic = new MessageTopic();
|
||||
List<String> allTopics = messageTopic.RocketMQTopicList();
|
||||
//订阅所有topic
|
||||
for (String topic : allTopics) {
|
||||
consumer.subscribe(topic,"*");
|
||||
}
|
||||
consumer.start();
|
||||
log.info("消费者初始化成功:{}", consumer);
|
||||
} catch (MQClientException e) {
|
||||
e.printStackTrace();
|
||||
log.error("消费者初始化失败:{}",e.getMessage());
|
||||
}
|
||||
return consumer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.tongran.rocketmq.config;
|
||||
|
||||
import com.tongran.rocketmq.model.ProducerMode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.client.exception.MQClientException;
|
||||
import org.apache.rocketmq.client.producer.DefaultMQProducer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
|
||||
/**
|
||||
* mq搭建地址连接
|
||||
* 生产者初者连接信息 具体看nacos配置
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class ProducerConfig {
|
||||
|
||||
/**
|
||||
* 远程调用连接信息
|
||||
*/
|
||||
public static DefaultMQProducer producer;
|
||||
|
||||
/**
|
||||
* 连接客户端信息配置 具体看nacos配置
|
||||
*/
|
||||
@Autowired
|
||||
private ProducerMode producerMode;
|
||||
|
||||
@Bean
|
||||
public DefaultMQProducer getRocketMQProducer() {
|
||||
producer = new DefaultMQProducer(producerMode.getAgentGroup());
|
||||
producer.setNamesrvAddr(producerMode.getNamesrvAddr());
|
||||
//如果需要同一个jvm中不同的producer往不同的mq集群发送消息,需要设置不同的instanceName
|
||||
if(producerMode.getMaxMessageSize()!=null){
|
||||
producer.setMaxMessageSize(producerMode.getMaxMessageSize());
|
||||
}
|
||||
if(producerMode.getSendMsgTimeout()!=null){
|
||||
producer.setSendMsgTimeout(producerMode.getSendMsgTimeout());
|
||||
}
|
||||
//如果发送消息失败,设置重试次数,默认为2次
|
||||
if(producerMode.getRetryTimesWhenSendFailed()!=null){
|
||||
producer.setRetryTimesWhenSendFailed(producerMode.getRetryTimesWhenSendFailed());
|
||||
}
|
||||
producer.setVipChannelEnabled(false);
|
||||
try {
|
||||
producer.start();
|
||||
log.info("生产者初始化成功:{}",producer.toString());
|
||||
} catch (MQClientException e) {
|
||||
log.error("生产者初始化失败:{}",e.getMessage());
|
||||
}
|
||||
return producer;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.consumer;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.tongran.rocketmq.domain.DeviceMessage;
|
||||
import com.tongran.rocketmq.enums.MessageCodeEnum;
|
||||
import com.tongran.rocketmq.handler.DeviceMessageHandler;
|
||||
import com.tongran.rocketmq.handler.MessageHandler;
|
||||
import com.tongran.rocketmq.producer.ConsumeException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
|
||||
import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息监听
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
@Autowired
|
||||
private DeviceMessageHandler deviceMessageHandler;
|
||||
@Autowired
|
||||
private MessageHandler messageHandler;
|
||||
|
||||
/**
|
||||
* 消费消息
|
||||
* @param list msgs.size() >= 1
|
||||
* DefaultMQPushConsumer.consumeMessageBatchMaxSize=1,you can modify here
|
||||
* 这里只设置为1,当设置为多个时,list中只要有一条消息消费失败,就会整体重试
|
||||
* @param consumeConcurrentlyContext 上下文信息
|
||||
* @return 消费状态 成功(CONSUME_SUCCESS)或者 重试 (RECONSUME_LATER)
|
||||
*/
|
||||
@Override
|
||||
public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> list, ConsumeConcurrentlyContext consumeConcurrentlyContext) {
|
||||
try{
|
||||
//消息不等于空情况
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
//获取topic
|
||||
for (MessageExt messageExt : list) {
|
||||
// 解析消息内容
|
||||
String body = new String(messageExt.getBody());
|
||||
log.info("接受到的消息为:{}", body);
|
||||
String tags = messageExt.getTags();
|
||||
String topic = messageExt.getTopic();
|
||||
String msgId = messageExt.getMsgId();
|
||||
String keys = messageExt.getKeys();
|
||||
int reConsume = messageExt.getReconsumeTimes();
|
||||
// 消息已经重试了3次,如果不需要再次消费,则返回成功
|
||||
if (reConsume == 3) {
|
||||
// TODO 补偿信息
|
||||
log.error("消息消费三次失败,消息内容:{}", body);
|
||||
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//根据业务返回是否正常
|
||||
}
|
||||
if(MessageCodeEnum.TONGRAN_AGENT_UP.getCode().equals(topic)){
|
||||
// 拿到信息
|
||||
DeviceMessage message = JSON.parseObject(body, DeviceMessage.class);
|
||||
// 处理消息
|
||||
deviceMessageHandler.handleMessage(message);
|
||||
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//业务处理成功
|
||||
}
|
||||
if(MessageCodeEnum.TR_AGENT_UP.getCode().equals(topic)){
|
||||
// 拿到信息
|
||||
DeviceMessage message = JSON.parseObject(body, DeviceMessage.class);
|
||||
// 处理消息
|
||||
messageHandler.handleMessage(message);
|
||||
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//业务处理成功
|
||||
}
|
||||
// 根据不同的topic处理不同的业务 这里以订单消息为例子
|
||||
}
|
||||
}
|
||||
// 消息消费失败
|
||||
//broker会根据设置的messageDelayLevel发起重试,默认16次
|
||||
return ConsumeConcurrentlyStatus.RECONSUME_LATER;
|
||||
} catch (Exception e) {
|
||||
// 调用 handleException 方法处理异常并返回处理结果
|
||||
return handleException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 异常处理
|
||||
*
|
||||
* @param e 捕获的异常
|
||||
* @return 消息消费结果
|
||||
*/
|
||||
private static ConsumeConcurrentlyStatus handleException(final Exception e) {
|
||||
Class exceptionClass = e.getClass();
|
||||
if (exceptionClass.equals(UnsupportedEncodingException.class)) {
|
||||
log.error(e.getMessage());
|
||||
} else if (exceptionClass.equals(ConsumeException.class)) {
|
||||
log.error(e.getMessage());
|
||||
} else{
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return ConsumeConcurrentlyStatus.RECONSUME_LATER;
|
||||
}
|
||||
}
|
||||
+616
@@ -0,0 +1,616 @@
|
||||
//package com.tongran.rocketmq.consumer;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSON;
|
||||
//import com.tongran.common.core.constant.SecurityConstants;
|
||||
//import com.tongran.common.core.domain.R;
|
||||
//import com.tongran.common.core.utils.DateUtils;
|
||||
//import com.tongran.common.core.utils.StringUtils;
|
||||
//import com.tongran.rocketmq.domain.*;
|
||||
//import com.tongran.rocketmq.domain.vo.RspVo;
|
||||
//import com.tongran.rocketmq.enums.MessageCodeEnum;
|
||||
//import com.tongran.rocketmq.handler.DeviceMessageHandler;
|
||||
//import com.tongran.rocketmq.producer.ConsumeException;
|
||||
//import com.tongran.rocketmq.service.*;
|
||||
//import com.tongran.rocketmq.utils.JsonDataParser;
|
||||
//import com.tongran.system.api.RemoteRevenueConfigService;
|
||||
//import com.tongran.system.api.domain.AllInterfaceNameRemote;
|
||||
//import com.tongran.system.api.domain.EpsInitialTrafficDataRemote;
|
||||
//import com.tongran.system.api.domain.InitialSwitchInfoDetailsRemote;
|
||||
//import com.tongran.system.api.domain.RmResourceRegistrationRemote;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
|
||||
//import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
|
||||
//import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently;
|
||||
//import org.apache.rocketmq.common.message.MessageExt;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.data.redis.core.RedisTemplate;
|
||||
//import org.springframework.scheduling.annotation.Scheduled;
|
||||
//import org.springframework.util.CollectionUtils;
|
||||
//
|
||||
//import java.io.UnsupportedEncodingException;
|
||||
//import java.math.BigDecimal;
|
||||
//import java.math.RoundingMode;
|
||||
//import java.util.Date;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//import java.util.Set;
|
||||
//import java.util.function.Function;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * 消息监听 v1.0
|
||||
// */
|
||||
//@Slf4j
|
||||
//public class RocketMsgListenerHistory implements MessageListenerConcurrently {
|
||||
// // 心跳状态
|
||||
// private static final String HEARTBEAT_STATUS_PREFIX = "heartbeat:status:";
|
||||
// // 心跳时间
|
||||
// private static final String HEARTBEAT_TIME_PREFIX = "heartbeat:time:";
|
||||
// // 心跳告警
|
||||
// private static final String HEARTBEAT_ALERT_PREFIX = "heartbeat:alert:";
|
||||
// String HEARTBEAT_RECOVERY_COUNT_PREFIX = "heartbeat:recovery:count:";
|
||||
// private static final long HEARTBEAT_TIMEOUT = 180000; // 3分钟超时
|
||||
//
|
||||
//
|
||||
// @Autowired
|
||||
// private RedisTemplate<String, String> redisTemplate;
|
||||
// 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
|
||||
// private IInitialHeartbeatListenLogService initialHeartbeatListenLog;
|
||||
// @Autowired
|
||||
// public RocketMsgListenerHistory(IInitialBandwidthTrafficService initialBandwidthTrafficService,
|
||||
// RemoteRevenueConfigService remoteRevenueConfigService) {
|
||||
// this.initialBandwidthTrafficService = initialBandwidthTrafficService;
|
||||
// this.remoteRevenueConfigService = remoteRevenueConfigService;
|
||||
// }
|
||||
// @Autowired
|
||||
// private DeviceMessageHandler deviceMessageHandler;
|
||||
//
|
||||
// /**
|
||||
// * 消费消息
|
||||
// * @param list msgs.size() >= 1
|
||||
// * DefaultMQPushConsumer.consumeMessageBatchMaxSize=1,you can modify here
|
||||
// * 这里只设置为1,当设置为多个时,list中只要有一条消息消费失败,就会整体重试
|
||||
// * @param consumeConcurrentlyContext 上下文信息
|
||||
// * @return 消费状态 成功(CONSUME_SUCCESS)或者 重试 (RECONSUME_LATER)
|
||||
// */
|
||||
// @Override
|
||||
// public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> list, ConsumeConcurrentlyContext consumeConcurrentlyContext) {
|
||||
// try{
|
||||
// //消息不等于空情况
|
||||
// if (!CollectionUtils.isEmpty(list)) {
|
||||
// //获取topic
|
||||
// for (MessageExt messageExt : list) {
|
||||
// // 解析消息内容
|
||||
// String body = new String(messageExt.getBody());
|
||||
// log.info("接受到的消息为:{}", body);
|
||||
// String tags = messageExt.getTags();
|
||||
// String topic = messageExt.getTopic();
|
||||
// String msgId = messageExt.getMsgId();
|
||||
// String keys = messageExt.getKeys();
|
||||
// int reConsume = messageExt.getReconsumeTimes();
|
||||
// // 消息已经重试了3次,如果不需要再次消费,则返回成功
|
||||
// if (reConsume == 3) {
|
||||
// // TODO 补偿信息
|
||||
// log.error("消息消费三次失败,消息内容:{}", body);
|
||||
// return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//根据业务返回是否正常
|
||||
// }
|
||||
// if(MessageCodeEnum.TONGRAN_AGENT_UP.getCode().equals(topic)){
|
||||
// // 拿到信息
|
||||
// DeviceMessage message = JSON.parseObject(body, DeviceMessage.class);
|
||||
// // 处理消息
|
||||
// deviceMessageHandler.handleMessage(message);
|
||||
// return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//业务处理成功
|
||||
// }
|
||||
// // 根据不同的topic处理不同的业务 这里以订单消息为例子
|
||||
// if (MessageCodeEnum.AGENT_MESSAGE_TOPIC.getCode().equals(topic)) {
|
||||
// // 拿到信息
|
||||
// DeviceMessage message = JSON.parseObject(body, DeviceMessage.class);
|
||||
// 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;
|
||||
// case "HEARTBEAT":
|
||||
// handleHeartbeatMessage(message);
|
||||
// break;
|
||||
// default:
|
||||
// log.warn("未知数据类型:{}",message.getDataType());
|
||||
// }
|
||||
// return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//业务处理成功
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // 消息消费失败
|
||||
// //broker会根据设置的messageDelayLevel发起重试,默认16次
|
||||
// return ConsumeConcurrentlyStatus.RECONSUME_LATER;
|
||||
// } catch (Exception e) {
|
||||
// // 调用 handleException 方法处理异常并返回处理结果
|
||||
// return handleException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 异常处理
|
||||
// *
|
||||
// * @param e 捕获的异常
|
||||
// * @return 消息消费结果
|
||||
// */
|
||||
// private static ConsumeConcurrentlyStatus handleException(final Exception e) {
|
||||
// Class exceptionClass = e.getClass();
|
||||
// if (exceptionClass.equals(UnsupportedEncodingException.class)) {
|
||||
// log.error(e.getMessage());
|
||||
// } else if (exceptionClass.equals(ConsumeException.class)) {
|
||||
// log.error(e.getMessage());
|
||||
// } else{
|
||||
// log.error(e.getMessage());
|
||||
// }
|
||||
// return ConsumeConcurrentlyStatus.RECONSUME_LATER;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 网络流量数据入库
|
||||
// * @param message
|
||||
// */
|
||||
// private void handleNetMessage(DeviceMessage message) {
|
||||
// List<InitialBandwidthTraffic> interfaces = JsonDataParser.parseJsonData(message.getData(), InitialBandwidthTraffic.class);
|
||||
// if(!interfaces.isEmpty()){
|
||||
// // 时间戳转换
|
||||
// long timestamp = interfaces.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// String timeStr = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",createTime);
|
||||
// InitialBandwidthTraffic data = new InitialBandwidthTraffic();
|
||||
// interfaces.forEach(iface -> {
|
||||
// iface.setClientId(message.getClientId());
|
||||
// iface.setCreateTime(createTime);
|
||||
// });
|
||||
// // 批量入库集合
|
||||
// data.setList(interfaces);
|
||||
// // 初始流量数据入库
|
||||
// initialBandwidthTrafficService.batchInsert(data);
|
||||
// EpsInitialTrafficDataRemote epsInitialTrafficDataRemote = new EpsInitialTrafficDataRemote();
|
||||
// epsInitialTrafficDataRemote.setStartTime(timeStr);
|
||||
// epsInitialTrafficDataRemote.setEndTime(timeStr);
|
||||
// // 复制到业务初始库
|
||||
// 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()){
|
||||
// // 时间戳转换
|
||||
// long timestamp = dockers.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// dockers.forEach(iface -> {
|
||||
// iface.setClientId(message.getClientId());
|
||||
// iface.setCreateTime(createTime);
|
||||
// });
|
||||
// // 初始容器数据入库
|
||||
// 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);
|
||||
// // 时间戳转换
|
||||
// long timestamp = cpus.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// if(!cpus.isEmpty()){
|
||||
// cpus.forEach(iface -> {
|
||||
// iface.setClientId(message.getClientId());
|
||||
// iface.setCreateTime(createTime);
|
||||
// });
|
||||
// // 初始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);
|
||||
// // 时间戳转换
|
||||
// long timestamp = disks.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// if(!disks.isEmpty()){
|
||||
// disks.forEach(iface -> {
|
||||
// iface.setClientId(message.getClientId());
|
||||
// iface.setCreateTime(createTime);
|
||||
// });
|
||||
// // 初始磁盘数据入库
|
||||
// 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()){
|
||||
// // 时间戳转换
|
||||
// long timestamp = memorys.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// memorys.forEach(iface -> {
|
||||
// iface.setClientId(message.getClientId());
|
||||
// iface.setCreateTime(createTime);
|
||||
// });
|
||||
// // 初始内存数据入库
|
||||
// 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()){
|
||||
// // 时间戳转换
|
||||
// long timestamp = mountPointInfos.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// mountPointInfos.forEach(iface -> {
|
||||
// iface.setClientId(message.getClientId());
|
||||
// iface.setCreateTime(createTime);
|
||||
// });
|
||||
// // 初始挂载点数据入库
|
||||
// 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()){
|
||||
// // 时间戳转换
|
||||
// long timestamp = switchInfos.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// String timeStr = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",createTime);
|
||||
// // 查询临时表信息,计算实际流量值
|
||||
// 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(createTime);
|
||||
// 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));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }else{
|
||||
// switchInfos.forEach(switchInfo -> {
|
||||
// switchInfo.setClientId(message.getClientId());
|
||||
// switchInfo.setCreateTime(createTime);
|
||||
// });
|
||||
// }
|
||||
// // 清空临时表对应switch信息
|
||||
// initialSwitchInfoTempService.truncateSwitchInfoTemp(message.getClientId());
|
||||
// // 临时表 用来计算inSpeed outSeppd
|
||||
// initialSwitchInfoTempService.batchInsertInitialSwitchInfoTemp(switchInfos);
|
||||
// // 初始交换机数据入库
|
||||
// initialSwitchInfoService.batchInsertInitialSwitchInfo(switchInfos);
|
||||
// // 业务表入库
|
||||
// InitialSwitchInfoDetailsRemote detailsRemote = new InitialSwitchInfoDetailsRemote();
|
||||
// detailsRemote.setClientId(message.getClientId());
|
||||
// detailsRemote.setStartTime(timeStr);
|
||||
// detailsRemote.setEndTime(timeStr);
|
||||
// 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()){
|
||||
// // 时间戳转换
|
||||
// long timestamp = systemInfos.get(0).getTimestamp();
|
||||
// long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp;
|
||||
// Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒
|
||||
// systemInfos.forEach(iface -> {
|
||||
// iface.setClientId(message.getClientId());
|
||||
// iface.setCreateTime(createTime);
|
||||
// });
|
||||
// // 初始系统数据入库
|
||||
// initialSystemInfoService.batchInsertInitialSystemInfo(systemInfos);
|
||||
// }else{
|
||||
// throw new RuntimeException("系统data数据为空");
|
||||
// }
|
||||
// }
|
||||
// /**
|
||||
// * 监听心跳
|
||||
// * @param message
|
||||
// */
|
||||
// private void handleHeartbeatMessage(DeviceMessage message) {
|
||||
// List<InitialHeartbeatListen> heartbeats = JsonDataParser.parseJsonData(message.getData(), InitialHeartbeatListen.class);
|
||||
// if(!heartbeats.isEmpty()){
|
||||
// InitialHeartbeatListen heartbeat = heartbeats.get(0);
|
||||
// String clientId = message.getClientId();
|
||||
// log.info("处理心跳消息,客户端ID: {}, 时间: {}", clientId, heartbeat.getTimestamp());
|
||||
// // 使用Redis存储状态
|
||||
// String statusKey = HEARTBEAT_STATUS_PREFIX + clientId;
|
||||
// String timeKey = HEARTBEAT_TIME_PREFIX + clientId;
|
||||
// String recoveryCountKey = HEARTBEAT_RECOVERY_COUNT_PREFIX + clientId; // 恢复次数计数器
|
||||
// try {
|
||||
// // 重置丢失计数为0,设置最后心跳时间
|
||||
// redisTemplate.opsForValue().set(statusKey, "0");
|
||||
// redisTemplate.opsForValue().set(timeKey, String.valueOf(System.currentTimeMillis()));
|
||||
//
|
||||
// // 检查是否之前有告警状态
|
||||
// if (Boolean.TRUE.equals(redisTemplate.hasKey(HEARTBEAT_ALERT_PREFIX + clientId))) {
|
||||
// // 获取当前恢复次数
|
||||
// String recoveryCountStr = redisTemplate.opsForValue().get(recoveryCountKey);
|
||||
// int recoveryCount = (recoveryCountStr == null) ? 1 : Integer.parseInt(recoveryCountStr) + 1;
|
||||
//
|
||||
// if (recoveryCount == 2) {
|
||||
// // 达到2次恢复,执行状态修改
|
||||
// log.warn("客户端ID: {} 心跳恢复达到2次,修改设备状态为在线", clientId);
|
||||
// insertHeartbeatLog(clientId, "2", "心跳恢复,设备在线状态改为在线");
|
||||
// redisTemplate.delete(HEARTBEAT_ALERT_PREFIX + clientId);
|
||||
// redisTemplate.delete(recoveryCountKey); // 清除恢复计数器
|
||||
// // 修改资源状态
|
||||
// getResourceMsg(clientId, "1");
|
||||
// } else {
|
||||
// // 未达到2次,只记录恢复次数
|
||||
// log.info("客户端ID: {} 心跳恢复第{}次", clientId, recoveryCount);
|
||||
// redisTemplate.opsForValue().set(recoveryCountKey, String.valueOf(recoveryCount));
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("处理心跳消息异常, clientId: {}", clientId, e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 添加一个定时任务方法,定期检查心跳状态
|
||||
// @Scheduled(fixedRate = 60000) // 每分钟检查一次
|
||||
// public void checkHeartbeatStatus() {
|
||||
// long currentTime = System.currentTimeMillis();
|
||||
// // 获取所有客户端时间键
|
||||
// Set<String> timeKeys = redisTemplate.keys(HEARTBEAT_TIME_PREFIX + "*");
|
||||
// if (timeKeys == null) return;
|
||||
//
|
||||
// for (String timeKey : timeKeys) {
|
||||
// String clientId = timeKey.substring(HEARTBEAT_TIME_PREFIX.length());
|
||||
// String statusKey = HEARTBEAT_STATUS_PREFIX + clientId;
|
||||
// String alertKey = HEARTBEAT_ALERT_PREFIX + clientId;
|
||||
//
|
||||
// try {
|
||||
// // 检查是否已经存在告警
|
||||
// String existingAlert = redisTemplate.opsForValue().get(alertKey);
|
||||
// if ("1".equals(existingAlert)) {
|
||||
// continue; // 如果已有告警,跳过处理
|
||||
// }
|
||||
// String lastTimeStr = redisTemplate.opsForValue().get(timeKey);
|
||||
// if (lastTimeStr == null) continue;
|
||||
//
|
||||
// long lastHeartbeatTime = Long.parseLong(lastTimeStr);
|
||||
//
|
||||
// if (currentTime - lastHeartbeatTime > HEARTBEAT_TIMEOUT) {
|
||||
// // 心跳超时处理
|
||||
// String lostCountStr = redisTemplate.opsForValue().get(statusKey);
|
||||
// int lostCount = (lostCountStr == null ? 0 : Integer.parseInt(lostCountStr)) + 1;
|
||||
// redisTemplate.opsForValue().set(statusKey, String.valueOf(lostCount));
|
||||
//
|
||||
// log.warn("客户端ID: {} 心跳丢失,连续次数: {}", clientId, lostCount);
|
||||
//
|
||||
// if (lostCount >= 3) {
|
||||
// insertHeartbeatLog(clientId, "3", "连续三次心跳丢失");
|
||||
// redisTemplate.opsForValue().set(HEARTBEAT_ALERT_PREFIX + clientId, "1");
|
||||
// // 设置告警后删除timeKey和statusKey
|
||||
// redisTemplate.delete(timeKey);
|
||||
// redisTemplate.delete(statusKey);
|
||||
//
|
||||
// log.info("客户端ID: {} 已设置告警并清理心跳记录", clientId);
|
||||
// // 修改资源状态
|
||||
// getResourceMsg(clientId, "0");
|
||||
// }
|
||||
// }else {
|
||||
// // 如果心跳正常,重置丢失次数
|
||||
// redisTemplate.opsForValue().set(statusKey, "0");
|
||||
// log.debug("客户端ID: {} 心跳正常,重置丢失次数", clientId);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("检查心跳状态异常, clientId: {}", clientId, e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改资源在线状态
|
||||
// * @param clientId
|
||||
// * @param status
|
||||
// */
|
||||
// private void getResourceMsg(String clientId, String status){
|
||||
// String ipAddress = null;
|
||||
// AllInterfaceNameRemote interfaceNameRemote = new AllInterfaceNameRemote();
|
||||
// interfaceNameRemote.setClientId(clientId);
|
||||
//
|
||||
// // 1. 先获取交换机IP
|
||||
// interfaceNameRemote.setResourceType("2");
|
||||
// R<AllInterfaceNameRemote> switchResult = remoteRevenueConfigService.getMsgByClientId(
|
||||
// interfaceNameRemote, SecurityConstants.INNER);
|
||||
//
|
||||
// if (switchResult != null && switchResult.getData() != null &&
|
||||
// StringUtils.isNotEmpty(switchResult.getData().getSwitchIp())) {
|
||||
// // 更新交换机状态
|
||||
// ipAddress = switchResult.getData().getSwitchIp();
|
||||
// updateResourceStatus(ipAddress, status);
|
||||
//
|
||||
// // 2. 再获取服务器IP
|
||||
// interfaceNameRemote.setResourceType("1");
|
||||
// R<AllInterfaceNameRemote> serverResult = remoteRevenueConfigService.getMsgByClientId(
|
||||
// interfaceNameRemote, SecurityConstants.INNER);
|
||||
//
|
||||
// if (serverResult != null && serverResult.getData() != null &&
|
||||
// StringUtils.isNotEmpty(serverResult.getData().getServerIp())) {
|
||||
// // 更新服务器状态
|
||||
// updateResourceStatus(serverResult.getData().getServerIp(), status);
|
||||
// }
|
||||
// } else {
|
||||
// // 3. 如果没有交换机IP,只获取服务器IP
|
||||
// interfaceNameRemote.setResourceType("1");
|
||||
// R<AllInterfaceNameRemote> serverResult = remoteRevenueConfigService.getMsgByClientId(
|
||||
// interfaceNameRemote, SecurityConstants.INNER);
|
||||
//
|
||||
// if (serverResult != null && serverResult.getData() != null &&
|
||||
// StringUtils.isNotEmpty(serverResult.getData().getServerIp())) {
|
||||
// // 更新服务器状态
|
||||
// updateResourceStatus(serverResult.getData().getServerIp(), status);
|
||||
// } else {
|
||||
// log.warn("未找到客户端ID: {} 对应的IP地址", clientId);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // 更新资源状态的公共方法
|
||||
// private void updateResourceStatus(String ipAddress, String status) {
|
||||
// RmResourceRegistrationRemote rmResourceRegistrationRemote = new RmResourceRegistrationRemote();
|
||||
// rmResourceRegistrationRemote.setOnlineStatus(status);
|
||||
// rmResourceRegistrationRemote.setRegistrationStatus(status);
|
||||
// rmResourceRegistrationRemote.setIpAddress(ipAddress);
|
||||
// remoteRevenueConfigService.updateStatusByResource(rmResourceRegistrationRemote, SecurityConstants.INNER);
|
||||
// }
|
||||
// // 插入心跳日志到数据库
|
||||
// private void insertHeartbeatLog(String machineId, String status, String remark) {
|
||||
// try {
|
||||
// InitialHeartbeatListenLog listenLog = new InitialHeartbeatListenLog();
|
||||
// listenLog.setClientId(machineId);
|
||||
// listenLog.setStatus(status); // 0-离线 1-在线 2-恢复 3-三次丢失
|
||||
// listenLog.setRemark(remark);
|
||||
// listenLog.setCreateTime(new Date());
|
||||
//
|
||||
// // 调用DAO或Service插入日志
|
||||
// initialHeartbeatListenLog.insertInitialHeartbeatListenLog(listenLog);
|
||||
// log.info("已记录心跳日志,客户端ID: {}, 状态: {}", machineId, status);
|
||||
// } catch (Exception e) {
|
||||
// log.error("插入心跳日志失败", e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 应答信息
|
||||
// * @param message
|
||||
// */
|
||||
// private RspVo handleResponseMessage(DeviceMessage message) {
|
||||
// List<RspVo> rspVoList = JsonDataParser.parseJsonData(message.getData(), RspVo.class);
|
||||
// if (!rspVoList.isEmpty()) {
|
||||
// RspVo rsp = rspVoList.get(0);
|
||||
// log.info("应答信息:{}",rsp);
|
||||
// return rsp;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
// /**
|
||||
// * 注册应答处理
|
||||
// * @param message
|
||||
// */
|
||||
//// private void handleRegisterMessage(DeviceMessage message) {
|
||||
//// RspVo rspVo = handleResponseMessage(message);
|
||||
//// String clientId = message.getClientId();
|
||||
//// if (rspVo != null && rspVo.getResCode() == 1) {
|
||||
//// RmResourceRegistrationRemote rmResourceRegistrationRemote = new RmResourceRegistrationRemote();
|
||||
//// rmResourceRegistrationRemote.setRegistrationStatus("1");
|
||||
//// rmResourceRegistrationRemote.setHardwareSn(clientId);
|
||||
//// remoteRevenueConfigService.updateStatusByResource(rmResourceRegistrationRemote, SecurityConstants.INNER);
|
||||
//// }else{
|
||||
//// if(rspVo == null){
|
||||
//// log.error("注册失败:应答信息为null");
|
||||
//// }else{
|
||||
//// log.error("注册失败:{}",rspVo.getResMsg());
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.tongran.rocketmq.consumer;
|
||||
|
||||
import org.apache.rocketmq.client.producer.LocalTransactionState;
|
||||
import org.apache.rocketmq.client.producer.TransactionListener;
|
||||
import org.apache.rocketmq.common.message.Message;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
|
||||
/**
|
||||
* 事物消息监听
|
||||
*/
|
||||
public class RocketMsgTransactionListenerImpl implements TransactionListener {
|
||||
|
||||
@Override
|
||||
public LocalTransactionState executeLocalTransaction(Message msg, Object arg) {
|
||||
// 在这里执行本地事务,比如数据库操作等
|
||||
// 如果本地事务执行成功,返回 COMMIT_MESSAGE
|
||||
// 如果本地事务执行失败,返回 ROLLBACK_MESSAGE
|
||||
// 如果本地事务执行中,可以返回 UNKNOW,RocketMQ 将会检查事务状态,并根据状态处理消息
|
||||
return LocalTransactionState.COMMIT_MESSAGE; // 根据实际情况返回对应的状态
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalTransactionState checkLocalTransaction(MessageExt msg) {
|
||||
// 检查本地事务状态,如果本地事务执行成功,返回 COMMIT_MESSAGE
|
||||
// 如果本地事务执行失败,返回 ROLLBACK_MESSAGE
|
||||
// 如果本地事务仍在执行中,返回 UNKNOW,RocketMQ 将会继续检查事务状态
|
||||
return LocalTransactionState.COMMIT_MESSAGE; // 根据实际情况返回对应的状态
|
||||
}
|
||||
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialBandwidthTraffic;
|
||||
import com.tongran.rocketmq.service.IInitialBandwidthTrafficService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 初始带宽流量Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/traffic")
|
||||
public class InitialBandwidthTrafficController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialBandwidthTrafficService initialBandwidthTrafficService;
|
||||
/**
|
||||
* 查询初始带宽流量列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialBandwidthTraffic initialBandwidthTraffic)
|
||||
{
|
||||
startPage();
|
||||
List<InitialBandwidthTraffic> list = initialBandwidthTrafficService.selectInitialBandwidthTrafficList(initialBandwidthTraffic);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出初始带宽流量列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:export")
|
||||
@Log(title = "初始带宽流量", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialBandwidthTraffic initialBandwidthTraffic)
|
||||
{
|
||||
List<InitialBandwidthTraffic> list = initialBandwidthTrafficService.selectInitialBandwidthTrafficList(initialBandwidthTraffic);
|
||||
ExcelUtil<InitialBandwidthTraffic> util = new ExcelUtil<InitialBandwidthTraffic>(InitialBandwidthTraffic.class);
|
||||
util.exportExcel(response, list, "初始带宽流量数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取初始带宽流量详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialBandwidthTrafficService.selectInitialBandwidthTrafficById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增初始带宽流量
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:add")
|
||||
@Log(title = "初始带宽流量", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialBandwidthTraffic initialBandwidthTraffic)
|
||||
{
|
||||
return toAjax(initialBandwidthTrafficService.insertInitialBandwidthTraffic(initialBandwidthTraffic));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改初始带宽流量
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:edit")
|
||||
@Log(title = "初始带宽流量", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialBandwidthTraffic initialBandwidthTraffic)
|
||||
{
|
||||
return toAjax(initialBandwidthTrafficService.updateInitialBandwidthTraffic(initialBandwidthTraffic));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除初始带宽流量
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:remove")
|
||||
@Log(title = "初始带宽流量", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialBandwidthTrafficService.deleteInitialBandwidthTrafficByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 网络接口基础信息
|
||||
* @param initialBandwidthTraffic
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:list")
|
||||
@PostMapping("/netInterfaceDetailsMsg")
|
||||
public AjaxResult netInterfaceDetailsMsg(@RequestBody InitialBandwidthTraffic initialBandwidthTraffic) {
|
||||
InitialBandwidthTraffic netInterfaceDetailsMsg = initialBandwidthTrafficService.getNetInterfaceDetailsMsg(initialBandwidthTraffic);
|
||||
return success(netInterfaceDetailsMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询eth0流量信息并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:list")
|
||||
@PostMapping("/netInterfaceTrafficEcharts")
|
||||
public AjaxResult netInterfaceTrafficEcharts(@RequestBody InitialBandwidthTraffic initialBandwidthTraffic) {
|
||||
Map<String, Object> echartsData = initialBandwidthTrafficService.netInterfaceTrafficEcharts(initialBandwidthTraffic);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* eth0丢包数
|
||||
* @param initialBandwidthTraffic
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:traffic:list")
|
||||
@PostMapping("/netInterfaceDroppedEcharts")
|
||||
public AjaxResult netInterfaceDroppedEcharts(@RequestBody InitialBandwidthTraffic initialBandwidthTraffic) {
|
||||
Map<String, Object> echartsData = initialBandwidthTrafficService.netInterfaceDroppedEcharts(initialBandwidthTraffic);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialBandwidthTrafficTemp;
|
||||
import com.tongran.rocketmq.service.IInitialBandwidthTrafficTempService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 初始带宽流量临时表Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/trafficTemp")
|
||||
public class InitialBandwidthTrafficTempController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialBandwidthTrafficTempService initialBandwidthTrafficTempService;
|
||||
|
||||
/**
|
||||
* 查询初始带宽流量临时表列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:trafficTemp:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialBandwidthTrafficTemp initialBandwidthTrafficTemp)
|
||||
{
|
||||
startPage();
|
||||
List<InitialBandwidthTrafficTemp> list = initialBandwidthTrafficTempService.selectInitialBandwidthTrafficTempList(initialBandwidthTrafficTemp);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出初始带宽流量临时表列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:trafficTemp:export")
|
||||
@Log(title = "初始带宽流量临时表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialBandwidthTrafficTemp initialBandwidthTrafficTemp)
|
||||
{
|
||||
List<InitialBandwidthTrafficTemp> list = initialBandwidthTrafficTempService.selectInitialBandwidthTrafficTempList(initialBandwidthTrafficTemp);
|
||||
ExcelUtil<InitialBandwidthTrafficTemp> util = new ExcelUtil<InitialBandwidthTrafficTemp>(InitialBandwidthTrafficTemp.class);
|
||||
util.exportExcel(response, list, "初始带宽流量临时表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取初始带宽流量临时表详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:trafficTemp:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialBandwidthTrafficTempService.selectInitialBandwidthTrafficTempById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增初始带宽流量临时表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:trafficTemp:add")
|
||||
@Log(title = "初始带宽流量临时表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialBandwidthTrafficTemp initialBandwidthTrafficTemp)
|
||||
{
|
||||
return toAjax(initialBandwidthTrafficTempService.insertInitialBandwidthTrafficTemp(initialBandwidthTrafficTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改初始带宽流量临时表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:trafficTemp:edit")
|
||||
@Log(title = "初始带宽流量临时表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialBandwidthTrafficTemp initialBandwidthTrafficTemp)
|
||||
{
|
||||
return toAjax(initialBandwidthTrafficTempService.updateInitialBandwidthTrafficTemp(initialBandwidthTrafficTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除初始带宽流量临时表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:trafficTemp:remove")
|
||||
@Log(title = "初始带宽流量临时表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialBandwidthTrafficTempService.deleteInitialBandwidthTrafficTempByIds(ids));
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialCpuInfo;
|
||||
import com.tongran.rocketmq.service.IInitialCpuInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 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")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialCpuInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialCpuInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:list")
|
||||
@PostMapping("/cpuLoadEcharts")
|
||||
public AjaxResult cpuLoadEcharts(@RequestBody InitialCpuInfo initialCpuInfo) {
|
||||
Map<String, Object> echartsData = initialCpuInfoService.cupLoadEcharts(initialCpuInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 查询CPU监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:list")
|
||||
@PostMapping("/cpuTimeEcharts")
|
||||
public AjaxResult cpuTimeEcharts(@RequestBody InitialCpuInfo initialCpuInfo) {
|
||||
Map<String, Object> echartsData = initialCpuInfoService.cpuTimeEcharts(initialCpuInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialDiskInfo;
|
||||
import com.tongran.rocketmq.service.IInitialDiskInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/diskInfo")
|
||||
public class InitialDiskInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialDiskInfoService initialDiskInfoService;
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialDiskInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialDiskInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 磁盘设备/dev/sda基础信息
|
||||
* @param initialDiskInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:distInfo:list")
|
||||
@PostMapping("/getDistDetailsMsg")
|
||||
public AjaxResult distDetailsMsg(@RequestBody InitialDiskInfo initialDiskInfo){
|
||||
return success(initialDiskInfoService.getDistDetailsMsg(initialDiskInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* /dev/sda读写速率(KB/s)
|
||||
* @param initialDiskInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:distInfo:list")
|
||||
@PostMapping("/rwSpeedEcharts")
|
||||
public AjaxResult rwSpeedEcharts(@RequestBody InitialDiskInfo initialDiskInfo){
|
||||
Map<String, Object> echartsData = initialDiskInfoService.rwSpeedEcharts(initialDiskInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* /dev/sda读写次数
|
||||
* @param initialDiskInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:distInfo:list")
|
||||
@PostMapping("/rwTimesEcharts")
|
||||
public AjaxResult rwTimesEcharts(@RequestBody InitialDiskInfo initialDiskInfo){
|
||||
Map<String, Object> echartsData = initialDiskInfoService.rwTimesEcharts(initialDiskInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* /dev/sda读写字节
|
||||
* @param initialDiskInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:distInfo:list")
|
||||
@PostMapping("/rwBytesEcharts")
|
||||
public AjaxResult rwBytesEcharts(@RequestBody InitialDiskInfo initialDiskInfo){
|
||||
Map<String, Object> echartsData = initialDiskInfoService.rwBytesEcharts(initialDiskInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取指定服务器的磁盘名称
|
||||
* @param initialDiskInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
||||
@PostMapping("/getAllDistName")
|
||||
public AjaxResult getAllDistName(@RequestBody InitialDiskInfo initialDiskInfo){
|
||||
List<Map> list = initialDiskInfoService.getAllDistName(initialDiskInfo);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialDockerInfo;
|
||||
import com.tongran.rocketmq.service.IInitialDockerInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 容器监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dockerInfo")
|
||||
public class InitialDockerInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialDockerInfoService initialDockerInfoService;
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialDockerInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialDockerInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 容器基础信息
|
||||
* @param initialDockerInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@PostMapping("/getDockerDetailsMsg")
|
||||
public AjaxResult dockerDetailsMsg(@RequestBody InitialDockerInfo initialDockerInfo){
|
||||
return success(initialDockerInfoService.getDockerDetailsMsg(initialDockerInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* cpu利用率
|
||||
* @param initialDockerInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@PostMapping("/cpuUtilEcharts")
|
||||
public AjaxResult cpuUtilEcharts(@RequestBody InitialDockerInfo initialDockerInfo){
|
||||
Map<String, Object> echartsData = initialDockerInfoService.cpuUtilEcharts(initialDockerInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 内存利用率
|
||||
* @param initialDockerInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@PostMapping("/memUtilEcharts")
|
||||
public AjaxResult memUtilEcharts(@RequestBody InitialDockerInfo initialDockerInfo){
|
||||
Map<String, Object> echartsData = initialDockerInfoService.memUtilEcharts(initialDockerInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 容器的网络速率(KB/s)
|
||||
* @param initialDockerInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@PostMapping("/netSpeedEcharts")
|
||||
public AjaxResult netSpeedEcharts(@RequestBody InitialDockerInfo initialDockerInfo){
|
||||
Map<String, Object> echartsData = initialDockerInfoService.netSpeedEcharts(initialDockerInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取指定服务器的容器id
|
||||
* @param initialDockerInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
||||
@PostMapping("/getAllDockerId")
|
||||
public AjaxResult getAllDockerId(@RequestBody InitialDockerInfo initialDockerInfo){
|
||||
List<Map> list = initialDockerInfoService.getAllDockerId(initialDockerInfo);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialHeartbeatListen;
|
||||
import com.tongran.rocketmq.service.IInitialHeartbeatListenService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 心跳信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/heartbeatListen")
|
||||
public class InitialHeartbeatListenController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialHeartbeatListenService initialHeartbeatListenService;
|
||||
|
||||
/**
|
||||
* 查询心跳信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:heartbeatListen:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialHeartbeatListen initialHeartbeatListen)
|
||||
{
|
||||
startPage();
|
||||
List<InitialHeartbeatListen> list = initialHeartbeatListenService.selectInitialHeartbeatListenList(initialHeartbeatListen);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出心跳信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:heartbeatListen:export")
|
||||
@Log(title = "心跳信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialHeartbeatListen initialHeartbeatListen)
|
||||
{
|
||||
List<InitialHeartbeatListen> list = initialHeartbeatListenService.selectInitialHeartbeatListenList(initialHeartbeatListen);
|
||||
ExcelUtil<InitialHeartbeatListen> util = new ExcelUtil<InitialHeartbeatListen>(InitialHeartbeatListen.class);
|
||||
util.exportExcel(response, list, "心跳信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取心跳信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:heartbeatListen:query")
|
||||
@GetMapping(value = "/{clientId}")
|
||||
public AjaxResult getInfo(@PathVariable("clientId") String clientId)
|
||||
{
|
||||
return success(initialHeartbeatListenService.selectInitialHeartbeatListenByClientId(clientId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增心跳信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:heartbeatListen:add")
|
||||
@Log(title = "心跳信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialHeartbeatListen initialHeartbeatListen)
|
||||
{
|
||||
return toAjax(initialHeartbeatListenService.insertInitialHeartbeatListen(initialHeartbeatListen));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改心跳信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:heartbeatListen:edit")
|
||||
@Log(title = "心跳信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialHeartbeatListen initialHeartbeatListen)
|
||||
{
|
||||
return toAjax(initialHeartbeatListenService.updateInitialHeartbeatListen(initialHeartbeatListen));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除心跳信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:heartbeatListen:remove")
|
||||
@Log(title = "心跳信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{clientIds}")
|
||||
public AjaxResult remove(@PathVariable String[] clientIds)
|
||||
{
|
||||
return toAjax(initialHeartbeatListenService.deleteInitialHeartbeatListenByClientIds(clientIds));
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialHeartbeatListenLog;
|
||||
import com.tongran.rocketmq.service.IInitialHeartbeatListenLogService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 心跳信息日志Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/log")
|
||||
public class InitialHeartbeatListenLogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialHeartbeatListenLogService initialHeartbeatListenLogService;
|
||||
|
||||
/**
|
||||
* 查询心跳信息日志列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:log:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialHeartbeatListenLog initialHeartbeatListenLog)
|
||||
{
|
||||
startPage();
|
||||
List<InitialHeartbeatListenLog> list = initialHeartbeatListenLogService.selectInitialHeartbeatListenLogList(initialHeartbeatListenLog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出心跳信息日志列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:log:export")
|
||||
@Log(title = "心跳信息日志", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialHeartbeatListenLog initialHeartbeatListenLog)
|
||||
{
|
||||
List<InitialHeartbeatListenLog> list = initialHeartbeatListenLogService.selectInitialHeartbeatListenLogList(initialHeartbeatListenLog);
|
||||
ExcelUtil<InitialHeartbeatListenLog> util = new ExcelUtil<InitialHeartbeatListenLog>(InitialHeartbeatListenLog.class);
|
||||
util.exportExcel(response, list, "心跳信息日志数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取心跳信息日志详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:log:query")
|
||||
@GetMapping(value = "/{clientId}")
|
||||
public AjaxResult getInfo(@PathVariable("clientId") String clientId)
|
||||
{
|
||||
return success(initialHeartbeatListenLogService.selectInitialHeartbeatListenLogByClientId(clientId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增心跳信息日志
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:log:add")
|
||||
@Log(title = "心跳信息日志", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialHeartbeatListenLog initialHeartbeatListenLog)
|
||||
{
|
||||
return toAjax(initialHeartbeatListenLogService.insertInitialHeartbeatListenLog(initialHeartbeatListenLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改心跳信息日志
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:log:edit")
|
||||
@Log(title = "心跳信息日志", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialHeartbeatListenLog initialHeartbeatListenLog)
|
||||
{
|
||||
return toAjax(initialHeartbeatListenLogService.updateInitialHeartbeatListenLog(initialHeartbeatListenLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除心跳信息日志
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:log:remove")
|
||||
@Log(title = "心跳信息日志", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{clientIds}")
|
||||
public AjaxResult remove(@PathVariable String[] clientIds)
|
||||
{
|
||||
return toAjax(initialHeartbeatListenLogService.deleteInitialHeartbeatListenLogByClientIds(clientIds));
|
||||
}
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialMemoryInfo;
|
||||
import com.tongran.rocketmq.service.IInitialMemoryInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 内存监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/memoryInfo")
|
||||
public class InitialMemoryInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialMemoryInfoService initialMemoryInfoService;
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialMemoryInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialMemoryInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交换空间可用量监控数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/swapSizeFreeEcharts")
|
||||
public AjaxResult swapSizeFreeEcharts(@RequestBody InitialMemoryInfo initialMemoryInfo) {
|
||||
Map<String, Object> echartsData = initialMemoryInfoService.swapSizeFreeEcharts(initialMemoryInfo);
|
||||
return AjaxResult.success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询内存利用率监控数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/untilzationEcharts")
|
||||
public AjaxResult untilzationEcharts(@RequestBody InitialMemoryInfo initialMemoryInfo) {
|
||||
Map<String, Object> echartsData = initialMemoryInfoService.untilzationEcharts(initialMemoryInfo);
|
||||
return AjaxResult.success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询内存可用量监控数据(KB)
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/availableMemoryEcharts")
|
||||
public AjaxResult availableMemoryEcharts(@RequestBody InitialMemoryInfo initialMemoryInfo) {
|
||||
Map<String, Object> echartsData = initialMemoryInfoService.availableMemoryEcharts(initialMemoryInfo);
|
||||
return AjaxResult.success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交换空间百分比监控数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/swapSizePercentEcharts")
|
||||
public AjaxResult swapSizePercentEcharts(@RequestBody InitialMemoryInfo initialMemoryInfo) {
|
||||
Map<String, Object> echartsData = initialMemoryInfoService.swapSizePercentEcharts(initialMemoryInfo);
|
||||
return AjaxResult.success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可用内存百分比监控数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/percentEcharts")
|
||||
public AjaxResult percentEcharts(@RequestBody InitialMemoryInfo initialMemoryInfo) {
|
||||
Map<String, Object> echartsData = initialMemoryInfoService.percentEcharts(initialMemoryInfo);
|
||||
return AjaxResult.success(echartsData);
|
||||
}
|
||||
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialMountPointInfo;
|
||||
import com.tongran.rocketmq.service.IInitialMountPointInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mountPointInfo")
|
||||
public class InitialMountPointInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialMountPointInfoService initialMountPointInfoService;
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialMountPointInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialMountPointInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
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));
|
||||
}
|
||||
/**
|
||||
* 获取挂载点监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
||||
@PostMapping(value = "/pointDetailsMsg")
|
||||
public AjaxResult pointDetailsMsg(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
InitialMountPointInfo mountPointInfo = initialMountPointInfoService.pointDetailsMsg(initialMountPointInfo);
|
||||
return success(mountPointInfo);
|
||||
}
|
||||
/**
|
||||
* 获取挂载文件系统/的空间图形
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
||||
@PostMapping(value = "/spaceEcharts")
|
||||
public AjaxResult spaceEcharts(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
Map<String, Object> echartsData = initialMountPointInfoService.spaceEcharts(initialMountPointInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取挂载文件系统/的空间利用率图形
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
||||
@PostMapping(value = "/spaceRateEcharts")
|
||||
public AjaxResult spaceRateEcharts(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
Map<String, Object> echartsData = initialMountPointInfoService.spaceRateEcharts(initialMountPointInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取指定服务器的挂载文件系统名
|
||||
* @param initialMountPointInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
||||
@PostMapping("/getAllMountName")
|
||||
public AjaxResult getAllMountName(@RequestBody InitialMountPointInfo initialMountPointInfo){
|
||||
List<Map> list = initialMountPointInfoService.getAllMountName(initialMountPointInfo);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialOtherSystemMonitorData;
|
||||
import com.tongran.rocketmq.service.IInitialOtherSystemMonitorDataService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 系统其他信息监控数据Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/otherSystemData")
|
||||
public class InitialOtherSystemMonitorDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialOtherSystemMonitorDataService initialOtherSystemMonitorDataService;
|
||||
|
||||
/**
|
||||
* 查询系统其他信息监控数据列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:otherSystemData:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialOtherSystemMonitorData initialOtherSystemMonitorData)
|
||||
{
|
||||
startPage();
|
||||
List<InitialOtherSystemMonitorData> list = initialOtherSystemMonitorDataService.selectInitialOtherSystemMonitorDataList(initialOtherSystemMonitorData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出系统其他信息监控数据列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:otherSystemData:export")
|
||||
@Log(title = "系统其他信息监控数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialOtherSystemMonitorData initialOtherSystemMonitorData)
|
||||
{
|
||||
List<InitialOtherSystemMonitorData> list = initialOtherSystemMonitorDataService.selectInitialOtherSystemMonitorDataList(initialOtherSystemMonitorData);
|
||||
ExcelUtil<InitialOtherSystemMonitorData> util = new ExcelUtil<InitialOtherSystemMonitorData>(InitialOtherSystemMonitorData.class);
|
||||
util.exportExcel(response, list, "系统其他信息监控数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统其他信息监控数据详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:otherSystemData:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialOtherSystemMonitorDataService.selectInitialOtherSystemMonitorDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统其他信息监控数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:otherSystemData:add")
|
||||
@Log(title = "系统其他信息监控数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialOtherSystemMonitorData initialOtherSystemMonitorData)
|
||||
{
|
||||
return toAjax(initialOtherSystemMonitorDataService.insertInitialOtherSystemMonitorData(initialOtherSystemMonitorData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统其他信息监控数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:otherSystemData:edit")
|
||||
@Log(title = "系统其他信息监控数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialOtherSystemMonitorData initialOtherSystemMonitorData)
|
||||
{
|
||||
return toAjax(initialOtherSystemMonitorDataService.updateInitialOtherSystemMonitorData(initialOtherSystemMonitorData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统其他信息监控数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:otherSystemData:remove")
|
||||
@Log(title = "系统其他信息监控数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialOtherSystemMonitorDataService.deleteInitialOtherSystemMonitorDataByIds(ids));
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSwitchFanInfo;
|
||||
import com.tongran.rocketmq.service.IInitialSwitchFanInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 风扇信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchFanInfo")
|
||||
public class InitialSwitchFanInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchFanInfoService initialSwitchFanInfoService;
|
||||
|
||||
/**
|
||||
* 查询风扇信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchFanInfo initialSwitchFanInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchFanInfo> list = initialSwitchFanInfoService.selectInitialSwitchFanInfoList(initialSwitchFanInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出风扇信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:export")
|
||||
@Log(title = "风扇信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchFanInfo initialSwitchFanInfo)
|
||||
{
|
||||
List<InitialSwitchFanInfo> list = initialSwitchFanInfoService.selectInitialSwitchFanInfoList(initialSwitchFanInfo);
|
||||
ExcelUtil<InitialSwitchFanInfo> util = new ExcelUtil<InitialSwitchFanInfo>(InitialSwitchFanInfo.class);
|
||||
util.exportExcel(response, list, "风扇信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取风扇信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchFanInfoService.selectInitialSwitchFanInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增风扇信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:add")
|
||||
@Log(title = "风扇信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo)
|
||||
{
|
||||
return toAjax(initialSwitchFanInfoService.insertInitialSwitchFanInfo(initialSwitchFanInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改风扇信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:edit")
|
||||
@Log(title = "风扇信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo)
|
||||
{
|
||||
return toAjax(initialSwitchFanInfoService.updateInitialSwitchFanInfo(initialSwitchFanInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除风扇信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:remove")
|
||||
@Log(title = "风扇信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchFanInfoService.deleteInitialSwitchFanInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定交换机的风扇名称
|
||||
* @param initialSwitchFanInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@PostMapping("/getAllFanName")
|
||||
public AjaxResult getAllFanName(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo){
|
||||
List<Map> list = initialSwitchFanInfoService.getAllFanName(initialSwitchFanInfo);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 获取风扇基础信息
|
||||
* @param initialSwitchFanInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@PostMapping("/getFanMsg")
|
||||
public AjaxResult getFanMsg(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo){
|
||||
List<InitialSwitchFanInfo> list = initialSwitchFanInfoService.getFanMsg(initialSwitchFanInfo);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.tongran.rocketmq.service.IInitialSwitchInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网络端口基础信息
|
||||
* @param initialSwitchInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||
@PostMapping("/getSwitchNetDetailsMsg")
|
||||
public AjaxResult switchNetDetailsMsg(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||
return success(initialSwitchInfoService.getSwitchNetDetailsMsg(initialSwitchInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网络端口网络速率
|
||||
* @param initialSwitchInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||
@PostMapping("/switchNetSpeedEcharts")
|
||||
public AjaxResult switchNetSpeedEcharts(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||
Map<String, Object> echartsData = initialSwitchInfoService.switchNetSpeedEcharts(initialSwitchInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取网络端口丢包数
|
||||
* @param initialSwitchInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||
@PostMapping("/switchNetDiscardsEcharts")
|
||||
public AjaxResult switchNetDiscardsEcharts(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||
Map<String, Object> echartsData = initialSwitchInfoService.switchNetDiscardsEcharts(initialSwitchInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取网络端口bites总数
|
||||
* @param initialSwitchInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||
@PostMapping("/switchNetTotalEcharts")
|
||||
public AjaxResult switchNetTotalEcharts(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||
Map<String, Object> echartsData = initialSwitchInfoService.switchNetTotalEcharts(initialSwitchInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取网络端口的错误包数
|
||||
* @param initialSwitchInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||
@PostMapping("/switchNetErrDiscardsEcharts")
|
||||
public AjaxResult switchNetErrDiscardsEcharts(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||
Map<String, Object> echartsData = initialSwitchInfoService.switchNetErrDiscardsEcharts(initialSwitchInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
import com.tongran.rocketmq.service.IInitialSwitchInfoTempService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.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));
|
||||
}
|
||||
}
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSwitchMpuInfo;
|
||||
import com.tongran.rocketmq.service.IInitialSwitchMpuInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* MPU信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchMpuInfo")
|
||||
public class InitialSwitchMpuInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchMpuInfoService initialSwitchMpuInfoService;
|
||||
|
||||
/**
|
||||
* 查询MPU信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchMpuInfo initialSwitchMpuInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchMpuInfo> list = initialSwitchMpuInfoService.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出MPU信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:export")
|
||||
@Log(title = "MPU信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchMpuInfo initialSwitchMpuInfo)
|
||||
{
|
||||
List<InitialSwitchMpuInfo> list = initialSwitchMpuInfoService.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo);
|
||||
ExcelUtil<InitialSwitchMpuInfo> util = new ExcelUtil<InitialSwitchMpuInfo>(InitialSwitchMpuInfo.class);
|
||||
util.exportExcel(response, list, "MPU信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取MPU信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchMpuInfoService.selectInitialSwitchMpuInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增MPU信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:add")
|
||||
@Log(title = "MPU信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo)
|
||||
{
|
||||
return toAjax(initialSwitchMpuInfoService.insertInitialSwitchMpuInfo(initialSwitchMpuInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改MPU信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:edit")
|
||||
@Log(title = "MPU信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo)
|
||||
{
|
||||
return toAjax(initialSwitchMpuInfoService.updateInitialSwitchMpuInfo(initialSwitchMpuInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除MPU信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:remove")
|
||||
@Log(title = "MPU信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchMpuInfoService.deleteInitialSwitchMpuInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有mpu名称
|
||||
* @param initialSwitchMpuInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@PostMapping("/getAllMpuName")
|
||||
public AjaxResult getAllMpuName(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||
List<Map> list = initialSwitchMpuInfoService.getAllMpuName(initialSwitchMpuInfo);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 获取mpu基础信息
|
||||
* @param initialSwitchMpuInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@PostMapping("/getMpuMsg")
|
||||
public AjaxResult getMpuMsg(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||
List<InitialSwitchMpuInfo> list = initialSwitchMpuInfoService.getMpuMsg(initialSwitchMpuInfo);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 获取mpu的cpu使用率
|
||||
* @param initialSwitchMpuInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@PostMapping("/getMpuCpuUse")
|
||||
public AjaxResult getMpuCpuUse(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||
Map<String, Object> echartsData = initialSwitchMpuInfoService.getMpuCpuUse(initialSwitchMpuInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取mpu的内存使用率
|
||||
* @param initialSwitchMpuInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@PostMapping("/getMpuMemUse")
|
||||
public AjaxResult getMpuMemUse(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||
Map<String, Object> echartsData = initialSwitchMpuInfoService.getMpuMemUse(initialSwitchMpuInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取mpu的温度
|
||||
* @param initialSwitchMpuInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@PostMapping("/getMpuTemperature")
|
||||
public AjaxResult getMpuTemperature(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||
Map<String, Object> echartsData = initialSwitchMpuInfoService.getMpuTemperature(initialSwitchMpuInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSwitchOpticalModule;
|
||||
import com.tongran.rocketmq.service.IInitialSwitchOpticalModuleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 光模块信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchOpticalModule")
|
||||
public class InitialSwitchOpticalModuleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchOpticalModuleService initialSwitchOpticalModuleService;
|
||||
|
||||
/**
|
||||
* 查询光模块信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchOpticalModule initialSwitchOpticalModule)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchOpticalModule> list = initialSwitchOpticalModuleService.selectInitialSwitchOpticalModuleList(initialSwitchOpticalModule);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出光模块信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:export")
|
||||
@Log(title = "光模块信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchOpticalModule initialSwitchOpticalModule)
|
||||
{
|
||||
List<InitialSwitchOpticalModule> list = initialSwitchOpticalModuleService.selectInitialSwitchOpticalModuleList(initialSwitchOpticalModule);
|
||||
ExcelUtil<InitialSwitchOpticalModule> util = new ExcelUtil<InitialSwitchOpticalModule>(InitialSwitchOpticalModule.class);
|
||||
util.exportExcel(response, list, "光模块信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取光模块信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchOpticalModuleService.selectInitialSwitchOpticalModuleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增光模块信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:add")
|
||||
@Log(title = "光模块信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule)
|
||||
{
|
||||
return toAjax(initialSwitchOpticalModuleService.insertInitialSwitchOpticalModule(initialSwitchOpticalModule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改光模块信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:edit")
|
||||
@Log(title = "光模块信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule)
|
||||
{
|
||||
return toAjax(initialSwitchOpticalModuleService.updateInitialSwitchOpticalModule(initialSwitchOpticalModule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除光模块信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:remove")
|
||||
@Log(title = "光模块信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchOpticalModuleService.deleteInitialSwitchOpticalModuleByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取该交换机的所有光模块名称
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:list")
|
||||
@PostMapping("/getAllModuleName")
|
||||
public AjaxResult getAllModuleName(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||
List<Map> list = initialSwitchOpticalModuleService.getAllModuleName(initialSwitchOpticalModule);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 获取光模块基础信息
|
||||
* @param initialSwitchOpticalModule
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:list")
|
||||
@PostMapping("/switchOpticalModuleMsg")
|
||||
public AjaxResult switchOpticalModuleMsg(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||
|
||||
List<InitialSwitchOpticalModule> list = initialSwitchOpticalModuleService.switchOpticalModuleMsg(initialSwitchOpticalModule);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 获取光模块的光衰阈值
|
||||
* @param initialSwitchOpticalModule
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:list")
|
||||
@PostMapping("/opticalModuleLowThreshold")
|
||||
public AjaxResult opticalModuleLowThreshold(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||
Map<String, Object> echartsData = initialSwitchOpticalModuleService.opticalModuleLowThreshold(initialSwitchOpticalModule);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取光模块的功率
|
||||
* @param initialSwitchOpticalModule
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:module:list")
|
||||
@PostMapping("/opticalModulePower")
|
||||
public AjaxResult opticalModulePower(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||
Map<String, Object> echartsData = initialSwitchOpticalModuleService.opticalModulePower(initialSwitchOpticalModule);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSwitchOtherCollectData;
|
||||
import com.tongran.rocketmq.service.IInitialSwitchOtherCollectDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 交换机系统其他信息采集数据Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchOtherData")
|
||||
public class InitialSwitchOtherCollectDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchOtherCollectDataService initialSwitchOtherCollectDataService;
|
||||
|
||||
/**
|
||||
* 查询交换机系统其他信息采集数据列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchOtherCollectData> list = initialSwitchOtherCollectDataService.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机系统其他信息采集数据列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:export")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
List<InitialSwitchOtherCollectData> list = initialSwitchOtherCollectDataService.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData);
|
||||
ExcelUtil<InitialSwitchOtherCollectData> util = new ExcelUtil<InitialSwitchOtherCollectData>(InitialSwitchOtherCollectData.class);
|
||||
util.exportExcel(response, list, "交换机系统其他信息采集数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机系统其他信息采集数据详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchOtherCollectDataService.selectInitialSwitchOtherCollectDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机系统其他信息采集数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:add")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
return toAjax(initialSwitchOtherCollectDataService.insertInitialSwitchOtherCollectData(initialSwitchOtherCollectData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机系统其他信息采集数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:edit")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
return toAjax(initialSwitchOtherCollectDataService.updateInitialSwitchOtherCollectData(initialSwitchOtherCollectData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机系统其他信息采集数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:remove")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchOtherCollectDataService.deleteInitialSwitchOtherCollectDataByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 图形监控交换机监控项基础信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||
@PostMapping("/getSwitchMonitorMsg")
|
||||
public AjaxResult getSwitchMonitorMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
Map list = initialSwitchOtherCollectDataService.getSwitchMonitorMsg(initialSwitchOtherCollectData);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 图形监控交换机设备CPU使用率
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||
@PostMapping("/getSwitchCpuUseMsg")
|
||||
public AjaxResult getSwitchCpuUseMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
Map<String, Object> echartsData = initialSwitchOtherCollectDataService.getSwitchCpuUseMsg(initialSwitchOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 图形监控交换机设备内存利用率
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||
@PostMapping("/getSwitchMemUseMsg")
|
||||
public AjaxResult getSwitchMemUseMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
Map<String, Object> echartsData = initialSwitchOtherCollectDataService.getSwitchMemUseMsg(initialSwitchOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 图形监控交换机设备系统功率
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||
@PostMapping("/getSwitchPowerMsg")
|
||||
public AjaxResult getSwitchPowerMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||
{
|
||||
Map<String, Object> echartsData = initialSwitchOtherCollectDataService.getSwitchPowerMsg(initialSwitchOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSwitchPowerSupply;
|
||||
import com.tongran.rocketmq.service.IInitialSwitchPowerSupplyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 电源信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchPowerSupply")
|
||||
public class InitialSwitchPowerSupplyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchPowerSupplyService initialSwitchPowerSupplyService;
|
||||
|
||||
/**
|
||||
* 查询电源信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchPowerSupply initialSwitchPowerSupply)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchPowerSupply> list = initialSwitchPowerSupplyService.selectInitialSwitchPowerSupplyList(initialSwitchPowerSupply);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出电源信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:export")
|
||||
@Log(title = "电源信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchPowerSupply initialSwitchPowerSupply)
|
||||
{
|
||||
List<InitialSwitchPowerSupply> list = initialSwitchPowerSupplyService.selectInitialSwitchPowerSupplyList(initialSwitchPowerSupply);
|
||||
ExcelUtil<InitialSwitchPowerSupply> util = new ExcelUtil<InitialSwitchPowerSupply>(InitialSwitchPowerSupply.class);
|
||||
util.exportExcel(response, list, "电源信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电源信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchPowerSupplyService.selectInitialSwitchPowerSupplyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电源信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:add")
|
||||
@Log(title = "电源信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply)
|
||||
{
|
||||
return toAjax(initialSwitchPowerSupplyService.insertInitialSwitchPowerSupply(initialSwitchPowerSupply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电源信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:edit")
|
||||
@Log(title = "电源信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply)
|
||||
{
|
||||
return toAjax(initialSwitchPowerSupplyService.updateInitialSwitchPowerSupply(initialSwitchPowerSupply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电源信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:remove")
|
||||
@Log(title = "电源信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchPowerSupplyService.deleteInitialSwitchPowerSupplyByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 获取指定交换机所有电源名称
|
||||
* @param initialSwitchPowerSupply
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:list")
|
||||
@PostMapping("/getAllPwrName")
|
||||
public AjaxResult getAllPwrName(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||
List<Map> list = initialSwitchPowerSupplyService.getAllPwrName(initialSwitchPowerSupply);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 获取电源基础信息
|
||||
* @param initialSwitchPowerSupply
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:list")
|
||||
@PostMapping("/getPwrMsg")
|
||||
public AjaxResult getPwrMsg(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||
List<Map> list = initialSwitchPowerSupplyService.getPwrMsg(initialSwitchPowerSupply);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 获取电源电流
|
||||
* @param initialSwitchPowerSupply
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:list")
|
||||
@PostMapping("/getPwrCurrent")
|
||||
public AjaxResult getPwrCurrent(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||
Map<String, Object> echartsData = initialSwitchPowerSupplyService.getPwrCurrent(initialSwitchPowerSupply);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 获取电源电压
|
||||
* @param initialSwitchPowerSupply
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:supply:list")
|
||||
@PostMapping("/getPwrVoltage")
|
||||
public AjaxResult getPwrVoltage(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||
Map<String, Object> echartsData = initialSwitchPowerSupplyService.getPwrVoltage(initialSwitchPowerSupply);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSystemInfo;
|
||||
import com.tongran.rocketmq.domain.vo.SystemMsgVo;
|
||||
import com.tongran.rocketmq.service.IInitialSystemInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 系统监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/systemInfo")
|
||||
public class InitialSystemInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSystemInfoService initialSystemInfoService;
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialSystemInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialSystemInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
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));
|
||||
}
|
||||
/**
|
||||
* 查询系统进程监控信息列表并封装为多折线ECharts图表数据
|
||||
* @param initialSystemInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/systemProcessEcharts")
|
||||
public AjaxResult systemProcessEcharts(@RequestBody InitialSystemInfo initialSystemInfo) {
|
||||
Map<String, Object> echartsData = initialSystemInfoService.systemProcessEcharts(initialSystemInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 查询系统登陆用户数(个)监控信息列表并封装为多折线ECharts图表数据
|
||||
* @param initialSystemInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/systemUserNumEcharts")
|
||||
public AjaxResult systemUserNumEcharts(@RequestBody InitialSystemInfo initialSystemInfo) {
|
||||
Map<String, Object> echartsData = initialSystemInfoService.systemUserNumEcharts(initialSystemInfo);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统基础信息
|
||||
* @param initialSystemInfo
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@PostMapping("/systemDetailsMsg")
|
||||
public AjaxResult systemDetailsMsg(@RequestBody InitialSystemInfo initialSystemInfo) {
|
||||
SystemMsgVo systemDetailsMsg = initialSystemInfoService.getSystemDetailsMsg(initialSystemInfo);
|
||||
return success(systemDetailsMsg);
|
||||
}
|
||||
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialSystemOtherCollectData;
|
||||
import com.tongran.rocketmq.service.IInitialSystemOtherCollectDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 交换机系统其他信息采集数据Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/systemOtherCollectData")
|
||||
public class InitialSystemOtherCollectDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSystemOtherCollectDataService initialSystemOtherCollectDataService;
|
||||
|
||||
/**
|
||||
* 查询交换机系统其他信息采集数据列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSystemOtherCollectData initialSystemOtherCollectData)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSystemOtherCollectData> list = initialSystemOtherCollectDataService.selectInitialSystemOtherCollectDataList(initialSystemOtherCollectData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机系统其他信息采集数据列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:export")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSystemOtherCollectData initialSystemOtherCollectData)
|
||||
{
|
||||
List<InitialSystemOtherCollectData> list = initialSystemOtherCollectDataService.selectInitialSystemOtherCollectDataList(initialSystemOtherCollectData);
|
||||
ExcelUtil<InitialSystemOtherCollectData> util = new ExcelUtil<InitialSystemOtherCollectData>(InitialSystemOtherCollectData.class);
|
||||
util.exportExcel(response, list, "交换机系统其他信息采集数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机系统其他信息采集数据详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSystemOtherCollectDataService.selectInitialSystemOtherCollectDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机系统其他信息采集数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:add")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData)
|
||||
{
|
||||
return toAjax(initialSystemOtherCollectDataService.insertInitialSystemOtherCollectData(initialSystemOtherCollectData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机系统其他信息采集数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:edit")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData)
|
||||
{
|
||||
return toAjax(initialSystemOtherCollectDataService.updateInitialSystemOtherCollectData(initialSystemOtherCollectData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机系统其他信息采集数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:remove")
|
||||
@Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSystemOtherCollectDataService.deleteInitialSystemOtherCollectDataByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 查询系统其他信息基础数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/getMontiorMsg")
|
||||
public AjaxResult getMontiorMsg(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData)
|
||||
{
|
||||
Map list = initialSystemOtherCollectDataService.getMonitorMsg(initialSystemOtherCollectData);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 查询系统登陆用户数(个)监控信息列表并封装为多折线ECharts图表数据
|
||||
* @param initialSystemOtherCollectData
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/systemUserNumEcharts")
|
||||
public AjaxResult systemUserNumEcharts(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) {
|
||||
Map<String, Object> echartsData = initialSystemOtherCollectDataService.systemUserNumEcharts(initialSystemOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 查询交换卷文件的可用空间监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/systemSwapSizeFreeEcharts")
|
||||
public AjaxResult systemSwapSizeFreeEcharts(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) {
|
||||
Map<String, Object> echartsData = initialSystemOtherCollectDataService.systemSwapSizeFreeEcharts(initialSystemOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询内存利用率监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/memoryUtilizationEcharts")
|
||||
public AjaxResult memoryUtilizationEcharts(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) {
|
||||
Map<String, Object> echartsData = initialSystemOtherCollectDataService.memoryUtilizationEcharts(initialSystemOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可用交换空间百分比监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/systemSwapSizePercentEcharts")
|
||||
public AjaxResult systemSwapSizePercentEcharts(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) {
|
||||
Map<String, Object> echartsData = initialSystemOtherCollectDataService.systemSwapSizePercentEcharts(initialSystemOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可用内存监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/memorySizeAvailableEcharts")
|
||||
public AjaxResult memorySizeAvailableEcharts(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) {
|
||||
Map<String, Object> echartsData = initialSystemOtherCollectDataService.memorySizeAvailableEcharts(initialSystemOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可用内存百分比监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/memorySizePercentEcharts")
|
||||
public AjaxResult memorySizePercentEcharts(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) {
|
||||
Map<String, Object> echartsData = initialSystemOtherCollectDataService.memorySizePercentEcharts(initialSystemOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询进程数监控信息列表并封装为多折线ECharts图表数据
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemOtherCollectData:list")
|
||||
@PostMapping("/procNumEcharts")
|
||||
public AjaxResult procNumEcharts(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) {
|
||||
Map<String, Object> echartsData = initialSystemOtherCollectDataService.procNumEcharts(initialSystemOtherCollectData);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmAgentManagement;
|
||||
import com.tongran.rocketmq.service.IRmAgentManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Agent管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/agentManagement")
|
||||
public class RmAgentManagementController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmAgentManagementService rmAgentManagementService;
|
||||
|
||||
/**
|
||||
* 查询Agent管理列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:management:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmAgentManagement rmAgentManagement)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmAgentManagement.getPageNum());
|
||||
pageDomain.setPageSize(rmAgentManagement.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmAgentManagement> list = rmAgentManagementService.selectRmAgentManagementList(rmAgentManagement);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Agent管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:management:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmAgentManagementService.selectRmAgentManagementById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增Agent管理
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:management:add")
|
||||
@Log(title = "Agent管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmAgentManagement rmAgentManagement)
|
||||
{
|
||||
return toAjax(rmAgentManagementService.addRmAgentManagement(rmAgentManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Agent管理
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:management:edit")
|
||||
@Log(title = "Agent管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmAgentManagement rmAgentManagement)
|
||||
{
|
||||
return toAjax(rmAgentManagementService.updateRmAgentManagement(rmAgentManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动立即更新
|
||||
* @param rmAgentManagement
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:management:edit")
|
||||
@PostMapping("/updateAgentNow")
|
||||
public AjaxResult updateAgentNow(@RequestBody RmAgentManagement rmAgentManagement){
|
||||
rmAgentManagementService.updateAgentNow(rmAgentManagement);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置更新策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:management:add")
|
||||
@Log(title = "Agent管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addUpdatePolicy")
|
||||
public AjaxResult addUpdatePolicy(@RequestBody RmAgentManagement rmAgentManagement)
|
||||
{
|
||||
return toAjax(rmAgentManagementService.addUpdatePolicy(rmAgentManagement));
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmAlarmLog;
|
||||
import com.tongran.rocketmq.service.IRmAlarmLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户端告警信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/alarmLog")
|
||||
public class RmAlarmLogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmAlarmLogService rmAlarmLogService;
|
||||
|
||||
/**
|
||||
* 查询客户端告警信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmLog:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmAlarmLog rmAlarmLog)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmAlarmLog.getPageNum());
|
||||
pageDomain.setPageSize(rmAlarmLog.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmAlarmLog> list = rmAlarmLogService.selectRmAlarmLogList(rmAlarmLog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户端告警信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmLog:export")
|
||||
@Log(title = "客户端告警信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmAlarmLog rmAlarmLog)
|
||||
{
|
||||
List<RmAlarmLog> list = rmAlarmLogService.selectRmAlarmLogList(rmAlarmLog);
|
||||
ExcelUtil<RmAlarmLog> util = new ExcelUtil<RmAlarmLog>(RmAlarmLog.class);
|
||||
util.showColumn(rmAlarmLog.getProperties());
|
||||
util.exportExcel(response, list, "客户端告警信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户端告警信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmLog:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmAlarmLogService.selectRmAlarmLogById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户端告警信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmLog:add")
|
||||
@Log(title = "客户端告警信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmAlarmLog rmAlarmLog)
|
||||
{
|
||||
return toAjax(rmAlarmLogService.insertRmAlarmLog(rmAlarmLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户端告警信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmLog:edit")
|
||||
@Log(title = "客户端告警信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmAlarmLog rmAlarmLog)
|
||||
{
|
||||
return toAjax(rmAlarmLogService.updateRmAlarmLog(rmAlarmLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户端告警信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmLog:remove")
|
||||
@Log(title = "客户端告警信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmAlarmLogService.deleteRmAlarmLogByIds(ids));
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmAlarmPolicy;
|
||||
import com.tongran.rocketmq.service.IRmAlarmPolicyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 告警策略Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/alarmPolicy")
|
||||
public class RmAlarmPolicyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmAlarmPolicyService rmAlarmPolicyService;
|
||||
|
||||
/**
|
||||
* 查询告警策略列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmAlarmPolicy rmAlarmPolicy)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmAlarmPolicy.getPageNum());
|
||||
pageDomain.setPageSize(rmAlarmPolicy.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmAlarmPolicy> list = rmAlarmPolicyService.selectRmAlarmPolicyList(rmAlarmPolicy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出告警策略列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:export")
|
||||
@Log(title = "告警策略", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmAlarmPolicy rmAlarmPolicy)
|
||||
{
|
||||
List<RmAlarmPolicy> list = rmAlarmPolicyService.selectRmAlarmPolicyList(rmAlarmPolicy);
|
||||
ExcelUtil<RmAlarmPolicy> util = new ExcelUtil<RmAlarmPolicy>(RmAlarmPolicy.class);
|
||||
util.exportExcel(response, list, "告警策略数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取告警策略详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmAlarmPolicyService.getRmAlarmPolicyMsgById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增告警策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:add")
|
||||
@Log(title = "告警策略", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmAlarmPolicy rmAlarmPolicy)
|
||||
{
|
||||
return toAjax(rmAlarmPolicyService.addRmAlarmPolicy(rmAlarmPolicy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改告警策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:edit")
|
||||
@Log(title = "告警策略", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmAlarmPolicy rmAlarmPolicy)
|
||||
{
|
||||
return toAjax(rmAlarmPolicyService.updateRmAlarmPolicy(rmAlarmPolicy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发告警策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:query")
|
||||
@GetMapping(value = "/issueAlarmPolicy")
|
||||
public AjaxResult issueAlarmPolicy(Long id)
|
||||
{
|
||||
return success(rmAlarmPolicyService.issueAlarmPolicy(id));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmAlarmPushConfig;
|
||||
import com.tongran.rocketmq.service.IRmAlarmPushConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 告警推送配置Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/alarmPushConfig")
|
||||
public class RmAlarmPushConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmAlarmPushConfigService rmAlarmPushConfigService;
|
||||
|
||||
/**
|
||||
* 查询告警推送配置列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmPushConfig:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmAlarmPushConfig rmAlarmPushConfig)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmAlarmPushConfig.getPageNum());
|
||||
pageDomain.setPageSize(rmAlarmPushConfig.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmAlarmPushConfig> list = rmAlarmPushConfigService.selectRmAlarmPushConfigList(rmAlarmPushConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出告警推送配置列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmPushConfig:export")
|
||||
@Log(title = "告警推送配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmAlarmPushConfig rmAlarmPushConfig)
|
||||
{
|
||||
List<RmAlarmPushConfig> list = rmAlarmPushConfigService.selectRmAlarmPushConfigList(rmAlarmPushConfig);
|
||||
ExcelUtil<RmAlarmPushConfig> util = new ExcelUtil<RmAlarmPushConfig>(RmAlarmPushConfig.class);
|
||||
util.showColumn(rmAlarmPushConfig.getProperties());
|
||||
util.exportExcel(response, list, "告警推送配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取告警推送配置详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmPushConfig:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmAlarmPushConfigService.selectRmAlarmPushConfigById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增告警推送配置
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmPushConfig:add")
|
||||
@Log(title = "告警推送配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmAlarmPushConfig rmAlarmPushConfig)
|
||||
{
|
||||
return toAjax(rmAlarmPushConfigService.insertRmAlarmPushConfig(rmAlarmPushConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改告警推送配置
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmPushConfig:edit")
|
||||
@Log(title = "告警推送配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmAlarmPushConfig rmAlarmPushConfig)
|
||||
{
|
||||
return toAjax(rmAlarmPushConfigService.updateRmAlarmPushConfig(rmAlarmPushConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除告警推送配置
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmPushConfig:remove")
|
||||
@Log(title = "告警推送配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmAlarmPushConfigService.deleteRmAlarmPushConfigByIds(ids));
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.domain.R;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.InnerAuth;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmAlarmRecord;
|
||||
import com.tongran.rocketmq.service.IRmAlarmRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 告警记录Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/alarmRecord")
|
||||
public class RmAlarmRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmAlarmRecordService rmAlarmRecordService;
|
||||
|
||||
/**
|
||||
* 查询告警记录列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:record:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmAlarmRecord rmAlarmRecord)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmAlarmRecord.getPageNum());
|
||||
pageDomain.setPageSize(rmAlarmRecord.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmAlarmRecord> list = rmAlarmRecordService.selectRmAlarmRecordList(rmAlarmRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询告警记录列表
|
||||
*/
|
||||
@InnerAuth
|
||||
@PostMapping("/getAlarmList")
|
||||
public R<List<RmAlarmRecord>> getAlarmList(@RequestBody RmAlarmRecord rmAlarmRecord)
|
||||
{
|
||||
List<RmAlarmRecord> list = rmAlarmRecordService.selectRmAlarmRecordList(rmAlarmRecord);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出告警记录列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:record:export")
|
||||
@Log(title = "告警记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmAlarmRecord rmAlarmRecord)
|
||||
{
|
||||
List<RmAlarmRecord> list = rmAlarmRecordService.selectRmAlarmRecordList(rmAlarmRecord);
|
||||
ExcelUtil<RmAlarmRecord> util = new ExcelUtil<RmAlarmRecord>(RmAlarmRecord.class);
|
||||
util.exportExcel(response, list, "告警记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取告警记录详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:record:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmAlarmRecordService.selectRmAlarmRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 资源告警处理情况
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/alarmHandlingStatus")
|
||||
public R<Map> alarmHandlingStatus(){
|
||||
Map alarmRecordMap = rmAlarmRecordService.alarmHandlingStatus();
|
||||
return R.ok(alarmRecordMap);
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmAlarmRule;
|
||||
import com.tongran.rocketmq.service.IRmAlarmRuleService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 告警规则Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rule")
|
||||
public class RmAlarmRuleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmAlarmRuleService rmAlarmRuleService;
|
||||
|
||||
/**
|
||||
* 查询告警规则列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:rule:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmAlarmRule rmAlarmRule)
|
||||
{
|
||||
startPage();
|
||||
List<RmAlarmRule> list = rmAlarmRuleService.selectRmAlarmRuleList(rmAlarmRule);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出告警规则列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:rule:export")
|
||||
@Log(title = "告警规则", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmAlarmRule rmAlarmRule)
|
||||
{
|
||||
List<RmAlarmRule> list = rmAlarmRuleService.selectRmAlarmRuleList(rmAlarmRule);
|
||||
ExcelUtil<RmAlarmRule> util = new ExcelUtil<RmAlarmRule>(RmAlarmRule.class);
|
||||
util.exportExcel(response, list, "告警规则数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取告警规则详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:rule:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmAlarmRuleService.selectRmAlarmRuleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增告警规则
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:rule:add")
|
||||
@Log(title = "告警规则", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmAlarmRule rmAlarmRule)
|
||||
{
|
||||
return toAjax(rmAlarmRuleService.insertRmAlarmRule(rmAlarmRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改告警规则
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:rule:edit")
|
||||
@Log(title = "告警规则", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmAlarmRule rmAlarmRule)
|
||||
{
|
||||
return toAjax(rmAlarmRuleService.updateRmAlarmRule(rmAlarmRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除告警规则
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:rule:remove")
|
||||
@Log(title = "告警规则", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmAlarmRuleService.deleteRmAlarmRuleByIds(ids));
|
||||
}
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmAlarmRuleTemplate;
|
||||
import com.tongran.rocketmq.service.IRmAlarmRuleTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 告警规则模板Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/alarmTemplate")
|
||||
public class RmAlarmRuleTemplateController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmAlarmRuleTemplateService rmAlarmRuleTemplateService;
|
||||
|
||||
/**
|
||||
* 查询告警规则模板列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:list")
|
||||
@PostMapping("/list")
|
||||
public AjaxResult list(@RequestBody RmAlarmRuleTemplate rmAlarmRuleTemplate)
|
||||
{
|
||||
List<RmAlarmRuleTemplate> list = rmAlarmRuleTemplateService.selectRmAlarmRuleTemplateList(rmAlarmRuleTemplate);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.domain.R;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.InnerAuth;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmDeploymentPolicy;
|
||||
import com.tongran.rocketmq.service.IRmDeploymentPolicyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器脚本策略Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/policy")
|
||||
public class RmDeploymentPolicyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmDeploymentPolicyService rmDeploymentPolicyService;
|
||||
|
||||
/**
|
||||
* 查询服务器脚本策略列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmDeploymentPolicy rmDeploymentPolicy)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmDeploymentPolicy.getPageNum());
|
||||
pageDomain.setPageSize(rmDeploymentPolicy.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmDeploymentPolicy> list = rmDeploymentPolicyService.selectRmDeploymentPolicyList(rmDeploymentPolicy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出服务器脚本策略列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:export")
|
||||
@Log(title = "服务器脚本策略", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, @RequestBody RmDeploymentPolicy rmDeploymentPolicy)
|
||||
{
|
||||
List<RmDeploymentPolicy> list = rmDeploymentPolicyService.selectRmDeploymentPolicyList(rmDeploymentPolicy);
|
||||
ExcelUtil<RmDeploymentPolicy> util = new ExcelUtil<RmDeploymentPolicy>(RmDeploymentPolicy.class);
|
||||
util.showColumn(rmDeploymentPolicy.getProperties());
|
||||
util.exportExcel(response, list, "服务器脚本策略数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务器脚本策略详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmDeploymentPolicyService.selectRmDeploymentPolicyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务器脚本策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:add")
|
||||
@Log(title = "服务器脚本策略", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmDeploymentPolicy rmDeploymentPolicy)
|
||||
{
|
||||
return toAjax(rmDeploymentPolicyService.insertRmDeploymentPolicy(rmDeploymentPolicy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务器脚本策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:edit")
|
||||
@Log(title = "服务器脚本策略", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmDeploymentPolicy rmDeploymentPolicy)
|
||||
{
|
||||
return toAjax(rmDeploymentPolicyService.updateRmDeploymentPolicy(rmDeploymentPolicy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务器脚本策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:remove")
|
||||
@Log(title = "服务器脚本策略", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmDeploymentPolicyService.deleteRmDeploymentPolicyByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发服务器脚本策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:list")
|
||||
@GetMapping(value = "/issueDeploymentPolicy")
|
||||
public AjaxResult issueDeploymentPolicy(Long id)
|
||||
{
|
||||
return success(rmDeploymentPolicyService.issueDeploymentPolicy(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务器脚本策略
|
||||
*/
|
||||
@InnerAuth
|
||||
@PostMapping("/addDeployScript")
|
||||
public R<Integer> addDeployScript(@RequestBody RmDeploymentPolicy rmDeploymentPolicy)
|
||||
{
|
||||
return R.ok(rmDeploymentPolicyService.insertRmDeploymentPolicy(rmDeploymentPolicy));
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmFileInfo;
|
||||
import com.tongran.rocketmq.service.IRmFileInfoService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 文件信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/info")
|
||||
public class RmFileInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmFileInfoService rmFileInfoService;
|
||||
|
||||
/**
|
||||
* 查询文件信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmFileInfo rmFileInfo)
|
||||
{
|
||||
startPage();
|
||||
List<RmFileInfo> list = rmFileInfoService.selectRmFileInfoList(rmFileInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出文件信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:export")
|
||||
@Log(title = "文件信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmFileInfo rmFileInfo)
|
||||
{
|
||||
List<RmFileInfo> list = rmFileInfoService.selectRmFileInfoList(rmFileInfo);
|
||||
ExcelUtil<RmFileInfo> util = new ExcelUtil<RmFileInfo>(RmFileInfo.class);
|
||||
util.exportExcel(response, list, "文件信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmFileInfoService.selectRmFileInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:add")
|
||||
@Log(title = "文件信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmFileInfo rmFileInfo)
|
||||
{
|
||||
return toAjax(rmFileInfoService.insertRmFileInfo(rmFileInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文件信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:edit")
|
||||
@Log(title = "文件信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmFileInfo rmFileInfo)
|
||||
{
|
||||
return toAjax(rmFileInfoService.updateRmFileInfo(rmFileInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:info:remove")
|
||||
@Log(title = "文件信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmFileInfoService.deleteRmFileInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmInitialMonitorItem;
|
||||
import com.tongran.rocketmq.service.IRmInitialMonitorItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 基础监控项Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/initialMonitorItem")
|
||||
public class RmInitialMonitorItemController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmInitialMonitorItemService rmInitialMonitorItemService;
|
||||
|
||||
/**
|
||||
* 查询监控项列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:item:list")
|
||||
@PostMapping("/list")
|
||||
public AjaxResult list(@RequestBody RmInitialMonitorItem rmInitialMonitorItem)
|
||||
{
|
||||
Map<String, List<RmInitialMonitorItem>> map = rmInitialMonitorItemService.selectAllMsgList(rmInitialMonitorItem);
|
||||
return success(map);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.domain.R;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.InnerAuth;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmMonitorPolicy;
|
||||
import com.tongran.rocketmq.service.IRmMonitorPolicyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源监控策略Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitorPolicy")
|
||||
public class RmMonitorPolicyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmMonitorPolicyService rmMonitorPolicyService;
|
||||
|
||||
/**
|
||||
* 查询资源监控策略列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmMonitorPolicy.getPageNum());
|
||||
pageDomain.setPageSize(rmMonitorPolicy.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmMonitorPolicy> list = rmMonitorPolicyService.selectRmMonitorPolicyList(rmMonitorPolicy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资源监控策略列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:export")
|
||||
@Log(title = "资源监控策略", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, @RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
List<RmMonitorPolicy> list = rmMonitorPolicyService.selectRmMonitorPolicyList(rmMonitorPolicy);
|
||||
ExcelUtil<RmMonitorPolicy> util = new ExcelUtil<RmMonitorPolicy>(RmMonitorPolicy.class);
|
||||
util.showColumn(rmMonitorPolicy.getProperties());
|
||||
util.exportExcel(response, list, "资源监控策略数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资源监控策略详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmMonitorPolicyService.getRmMonitorPolicyMsgById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资源监控策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:add")
|
||||
@Log(title = "资源监控策略", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
int rows = rmMonitorPolicyService.addRmMonitorPolicy(rmMonitorPolicy);
|
||||
if(rows == -1){
|
||||
return AjaxResult.error("资源监控策略新增失败,该资源组已绑定其他策略");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资源监控策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:edit")
|
||||
@Log(title = "资源监控策略", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
int rows = rmMonitorPolicyService.updateRmMonitorPolicy(rmMonitorPolicy);
|
||||
if(rows == -1){
|
||||
return AjaxResult.error("资源监控策略新增失败,该资源组已绑定其他策略");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
/**
|
||||
* 资源监控策略下发
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:edit")
|
||||
@Log(title = "资源监控策略下发", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/issuePolicy")
|
||||
public AjaxResult issuePolicy(Long id)
|
||||
{
|
||||
return toAjax(rmMonitorPolicyService.issuePolicy(id));
|
||||
}
|
||||
/**
|
||||
* 资源监控策略下发
|
||||
*/
|
||||
// @RequiresPermissions("rocketmq:policy:edit")
|
||||
@Log(title = "issueSwitchPolicy", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/issueSwitchPolicy")
|
||||
public AjaxResult issueSwitchPolicy(Long id)
|
||||
{
|
||||
return toAjax(rmMonitorPolicyService.issueSwitchPolicy(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:remove")
|
||||
@Log(title = "资源监控策略", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmMonitorPolicyService.deleteRmMonitorPolicyByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:add")
|
||||
@Log(title = "资源监控策略", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addResourcePolicy")
|
||||
public AjaxResult addResourcePolicy(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
int rows = rmMonitorPolicyService.addResourcePolicy(rmMonitorPolicy);
|
||||
return toAjax(rows);
|
||||
}
|
||||
/**
|
||||
* 修改交换机监控策略
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:update")
|
||||
@Log(title = "资源监控策略", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/updateResourcePolicy")
|
||||
public AjaxResult updateResourcePolicy(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
int rows = rmMonitorPolicyService.updateResourcePolicy(rmMonitorPolicy);
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* 策略下发,内部调用
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "issueSwitchPolicy", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/innerIssueSwitchPolicy")
|
||||
@InnerAuth
|
||||
public R<String> innerIssueSwitchPolicy(Long id)
|
||||
{
|
||||
rmMonitorPolicyService.issueSwitchPolicy(id);
|
||||
return R.ok("优先级0策略下发成功");
|
||||
}
|
||||
/**
|
||||
* 查询资源监控策略列表
|
||||
*/
|
||||
@PostMapping("/getPolicyMsgInner")
|
||||
@InnerAuth
|
||||
public R<List<RmMonitorPolicy>> getPolicyMsgInner(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
List<RmMonitorPolicy> list = rmMonitorPolicyService.selectRmMonitorPolicyList(rmMonitorPolicy);
|
||||
return R.ok(list);
|
||||
}
|
||||
/**
|
||||
* 修改资源监控策略
|
||||
*/
|
||||
@PostMapping("/updatePolicyMsgInner")
|
||||
@InnerAuth
|
||||
public R<Integer> updatePolicyMsgInner(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
int rows = rmMonitorPolicyService.updatePolicyMsgInner(rmMonitorPolicy);
|
||||
return R.ok(rows);
|
||||
}
|
||||
/**
|
||||
* 修改资源监控策略
|
||||
*/
|
||||
@GetMapping("/issueDefaultPolicyByClientId")
|
||||
@InnerAuth
|
||||
public R<Integer> issueDefaultPolicyByClientId(String clientId)
|
||||
{
|
||||
int rows = rmMonitorPolicyService.issueDefaultPolicyByClientId(clientId);
|
||||
return R.ok(rows);
|
||||
}
|
||||
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmMonitorTemplate;
|
||||
import com.tongran.rocketmq.domain.vo.RmMonitorTemplateVo;
|
||||
import com.tongran.rocketmq.service.IRmMonitorTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 监控模板Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/template")
|
||||
public class RmMonitorTemplateController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmMonitorTemplateService rmMonitorTemplateService;
|
||||
|
||||
/**
|
||||
* 查询监控模板列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmMonitorTemplate rmMonitorTemplate)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmMonitorTemplate.getPageNum());
|
||||
pageDomain.setPageSize(rmMonitorTemplate.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmMonitorTemplate> list = rmMonitorTemplateService.selectRmMonitorTemplateList(rmMonitorTemplate);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出监控模板列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:export")
|
||||
@Log(title = "监控模板", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, @RequestBody RmMonitorTemplate rmMonitorTemplate)
|
||||
{
|
||||
List<RmMonitorTemplate> list = rmMonitorTemplateService.selectRmMonitorTemplateList(rmMonitorTemplate);
|
||||
ExcelUtil<RmMonitorTemplate> util = new ExcelUtil<RmMonitorTemplate>(RmMonitorTemplate.class);
|
||||
util.showColumn(rmMonitorTemplate.getProperties());
|
||||
util.exportExcel(response, list, "监控模板数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控模板详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmMonitorTemplateService.getTemplateMsgById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:add")
|
||||
@Log(title = "监控模板", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmMonitorTemplateVo rmMonitorTemplateVo)
|
||||
{
|
||||
return toAjax(rmMonitorTemplateService.addRmMonitorTemplate(rmMonitorTemplateVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:edit")
|
||||
@Log(title = "监控模板", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmMonitorTemplateVo rmMonitorTemplateVo)
|
||||
{
|
||||
return toAjax(rmMonitorTemplateService.updateRmMonitorTemplate(rmMonitorTemplateVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:remove")
|
||||
@Log(title = "监控模板", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmMonitorTemplateService.deleteRmMonitorTemplateByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 关联监控模板查询
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:template:list")
|
||||
@GetMapping("/getAllTemplate")
|
||||
public AjaxResult getAllTemplate()
|
||||
{
|
||||
List<Map> list = rmMonitorTemplateService.getAllTemplate();
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.domain.R;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.InnerAuth;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmNetworkInterface;
|
||||
import com.tongran.rocketmq.service.IRmNetworkInterfaceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户端网络接口信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/networkInterface")
|
||||
public class RmNetworkInterfaceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmNetworkInterfaceService rmNetworkInterfaceService;
|
||||
|
||||
/**
|
||||
* 查询客户端网络接口信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:networkInterface:list")
|
||||
@PostMapping("/list")
|
||||
public AjaxResult list(@RequestBody RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
List<RmNetworkInterface> list = rmNetworkInterfaceService.selectRmNetworkInterfaceList(rmNetworkInterface);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户端网络接口信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:networkInterface:export")
|
||||
@Log(title = "客户端网络接口信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
List<RmNetworkInterface> list = rmNetworkInterfaceService.selectRmNetworkInterfaceList(rmNetworkInterface);
|
||||
ExcelUtil<RmNetworkInterface> util = new ExcelUtil<RmNetworkInterface>(RmNetworkInterface.class);
|
||||
util.exportExcel(response, list, "客户端网络接口信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户端网络接口信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:networkInterface:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmNetworkInterfaceService.selectRmNetworkInterfaceById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户端网络接口信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:networkInterface:add")
|
||||
@Log(title = "客户端网络接口信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
return toAjax(rmNetworkInterfaceService.insertRmNetworkInterface(rmNetworkInterface));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户端网络接口信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:networkInterface:edit")
|
||||
@Log(title = "客户端网络接口信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
return toAjax(rmNetworkInterfaceService.updateRmNetworkInterface(rmNetworkInterface));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户端网络接口信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:networkInterface:remove")
|
||||
@Log(title = "客户端网络接口信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmNetworkInterfaceService.deleteRmNetworkInterfaceByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 远程调用查询客户端网络接口信息列表
|
||||
*/
|
||||
@InnerAuth
|
||||
@PostMapping("/getNetworkInterfaceList")
|
||||
public R getNetworkInterfaceList(@RequestBody RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
List<RmNetworkInterface> list = rmNetworkInterfaceService.selectRmNetworkInterfaceList(rmNetworkInterface);
|
||||
return R.ok(list);
|
||||
}
|
||||
/**
|
||||
* 远程调用修改客户端网络接口信息
|
||||
*/
|
||||
@InnerAuth
|
||||
@PostMapping("/bindPublicIp")
|
||||
public R<Integer> bindPublicIp(@RequestBody RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
int rows = rmNetworkInterfaceService.bindPublicIp(rmNetworkInterface);
|
||||
return R.ok(rows);
|
||||
}
|
||||
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmPolicyDeviceDetails;
|
||||
import com.tongran.rocketmq.service.IRmPolicyDeviceDetailsService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 客户端策略关联Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/policyDeviceDetails")
|
||||
public class RmPolicyDeviceDetailsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmPolicyDeviceDetailsService rmPolicyDeviceDetailsService;
|
||||
|
||||
/**
|
||||
* 查询客户端策略关联列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policyDeviceDetails:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmPolicyDeviceDetails rmPolicyDeviceDetails)
|
||||
{
|
||||
startPage();
|
||||
List<RmPolicyDeviceDetails> list = rmPolicyDeviceDetailsService.selectRmPolicyDeviceDetailsList(rmPolicyDeviceDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户端策略关联列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policyDeviceDetails:export")
|
||||
@Log(title = "客户端策略关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmPolicyDeviceDetails rmPolicyDeviceDetails)
|
||||
{
|
||||
List<RmPolicyDeviceDetails> list = rmPolicyDeviceDetailsService.selectRmPolicyDeviceDetailsList(rmPolicyDeviceDetails);
|
||||
ExcelUtil<RmPolicyDeviceDetails> util = new ExcelUtil<RmPolicyDeviceDetails>(RmPolicyDeviceDetails.class);
|
||||
util.exportExcel(response, list, "客户端策略关联数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户端策略关联详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policyDeviceDetails:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmPolicyDeviceDetailsService.selectRmPolicyDeviceDetailsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户端策略关联
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policyDeviceDetails:add")
|
||||
@Log(title = "客户端策略关联", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmPolicyDeviceDetails rmPolicyDeviceDetails)
|
||||
{
|
||||
return toAjax(rmPolicyDeviceDetailsService.insertRmPolicyDeviceDetails(rmPolicyDeviceDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户端策略关联
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policyDeviceDetails:edit")
|
||||
@Log(title = "客户端策略关联", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmPolicyDeviceDetails rmPolicyDeviceDetails)
|
||||
{
|
||||
return toAjax(rmPolicyDeviceDetailsService.updateRmPolicyDeviceDetails(rmPolicyDeviceDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户端策略关联
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policyDeviceDetails:remove")
|
||||
@Log(title = "客户端策略关联", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmPolicyDeviceDetailsService.deleteRmPolicyDeviceDetailsByIds(ids));
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.PageDomain;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmResourceRemote;
|
||||
import com.tongran.rocketmq.service.IRmResourceRemoteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源远程管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/remote")
|
||||
public class RmResourceRemoteController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmResourceRemoteService rmResourceRemoteService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取资源远程管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:remote:query")
|
||||
@PostMapping(value = "/getScriptResultBySn")
|
||||
public AjaxResult getScriptResultBySn(@RequestBody RmResourceRemote rmResourceRemote)
|
||||
{
|
||||
return success(rmResourceRemoteService.getScriptResultBySn(rmResourceRemote));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资源远程管理详细信息 -- 分页
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:remote:query")
|
||||
@PostMapping(value = "/getScriptResultByScriptId")
|
||||
public TableDataInfo getScriptResultByScriptId(@RequestBody RmResourceRemote rmResourceRemote)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmResourceRemote.getPageNum());
|
||||
pageDomain.setPageSize(rmResourceRemote.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<Map<String, Object>> list = rmResourceRemoteService.getScriptResultByScriptId(rmResourceRemote);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmTemplateLinux;
|
||||
import com.tongran.rocketmq.service.IRmTemplateLinuxService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* Linux系统监控项Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/linux")
|
||||
public class RmTemplateLinuxController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmTemplateLinuxService rmTemplateLinuxService;
|
||||
|
||||
/**
|
||||
* 查询Linux系统监控项列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:linux:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmTemplateLinux rmTemplateLinux)
|
||||
{
|
||||
startPage();
|
||||
List<RmTemplateLinux> list = rmTemplateLinuxService.selectRmTemplateLinuxList(rmTemplateLinux);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出Linux系统监控项列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:linux:export")
|
||||
@Log(title = "Linux系统监控项", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmTemplateLinux rmTemplateLinux)
|
||||
{
|
||||
List<RmTemplateLinux> list = rmTemplateLinuxService.selectRmTemplateLinuxList(rmTemplateLinux);
|
||||
ExcelUtil<RmTemplateLinux> util = new ExcelUtil<RmTemplateLinux>(RmTemplateLinux.class);
|
||||
util.exportExcel(response, list, "Linux系统监控项数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Linux系统监控项详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:linux:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmTemplateLinuxService.selectRmTemplateLinuxById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增Linux系统监控项
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:linux:add")
|
||||
@Log(title = "Linux系统监控项", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmTemplateLinux rmTemplateLinux)
|
||||
{
|
||||
return toAjax(rmTemplateLinuxService.insertRmTemplateLinux(rmTemplateLinux));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改Linux系统监控项
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:linux:edit")
|
||||
@Log(title = "Linux系统监控项", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmTemplateLinux rmTemplateLinux)
|
||||
{
|
||||
return toAjax(rmTemplateLinuxService.updateRmTemplateLinux(rmTemplateLinux));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除Linux系统监控项
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:linux:remove")
|
||||
@Log(title = "Linux系统监控项", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmTemplateLinuxService.deleteRmTemplateLinuxByIds(ids));
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.RmTemplateSwitch;
|
||||
import com.tongran.rocketmq.service.IRmTemplateSwitchService;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 交换机监控模板Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switch")
|
||||
public class RmTemplateSwitchController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmTemplateSwitchService rmTemplateSwitchService;
|
||||
|
||||
/**
|
||||
* 查询交换机监控模板列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switch:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmTemplateSwitch rmTemplateSwitch)
|
||||
{
|
||||
startPage();
|
||||
List<RmTemplateSwitch> list = rmTemplateSwitchService.selectRmTemplateSwitchList(rmTemplateSwitch);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机监控模板列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switch:export")
|
||||
@Log(title = "交换机监控模板", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmTemplateSwitch rmTemplateSwitch)
|
||||
{
|
||||
List<RmTemplateSwitch> list = rmTemplateSwitchService.selectRmTemplateSwitchList(rmTemplateSwitch);
|
||||
ExcelUtil<RmTemplateSwitch> util = new ExcelUtil<RmTemplateSwitch>(RmTemplateSwitch.class);
|
||||
util.exportExcel(response, list, "交换机监控模板数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机监控模板详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switch:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmTemplateSwitchService.selectRmTemplateSwitchById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switch:add")
|
||||
@Log(title = "交换机监控模板", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmTemplateSwitch rmTemplateSwitch)
|
||||
{
|
||||
return toAjax(rmTemplateSwitchService.insertRmTemplateSwitch(rmTemplateSwitch));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switch:edit")
|
||||
@Log(title = "交换机监控模板", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmTemplateSwitch rmTemplateSwitch)
|
||||
{
|
||||
return toAjax(rmTemplateSwitchService.updateRmTemplateSwitch(rmTemplateSwitch));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switch:remove")
|
||||
@Log(title = "交换机监控模板", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmTemplateSwitchService.deleteRmTemplateSwitchByIds(ids));
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
|
||||
import com.tongran.common.security.annotation.InnerAuth;
|
||||
import com.tongran.rocketmq.producer.MessageProducer;
|
||||
import org.apache.rocketmq.client.producer.SendResult;
|
||||
import org.apache.rocketmq.common.message.Message;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 消息测试类Controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/rocketMessage")
|
||||
public class RocketMqController {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 发送同步消息
|
||||
*/
|
||||
@PostMapping("/sendSynchronizeMessage")
|
||||
private Map sendSynchronizeMessage(){
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
//调用MessageProducer配置好的消息方法
|
||||
SendResult sendResult = messageProducer.sendSynchronizeMessage("order-message","order_message_tag","title","content");
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result.put("data",sendResult);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 发送单向消息
|
||||
*/
|
||||
@PostMapping("/sendOnewayMessage")
|
||||
private Map sendOnewayMessage(@RequestParam("topic") String topic,@RequestParam("tag") String tag,@RequestParam("key") String key,@RequestParam("value") String value){
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
//调用MessageProducer配置好的消息方法 topic需要你根据你们业务定制相应的
|
||||
messageProducer.sendOnewayMessage("order-message","order_timeout_tag","title","content");
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result.put("msg","发送成功");
|
||||
result.put("code",200);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量发送消息
|
||||
*/
|
||||
@PostMapping("/sendBatchMessage")
|
||||
private Map sendBatchMessage(){
|
||||
// 根据实际需求创建消息列表并返回
|
||||
List<Message> messages = new ArrayList<>();
|
||||
// 添加消息到列表
|
||||
messages.add(new Message("order-message", "order_timeout_tag", "Message 1".getBytes()));
|
||||
messages.add(new Message("order-message", "order_timeout_tag", "Message 2".getBytes()));
|
||||
messages.add(new Message("order-message", "order_timeout_tag", "Message 3".getBytes()));
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
//调用MessageProducer配置好的消息方法 topic需要你根据你们业务定制相应的
|
||||
SendResult sendResult = messageProducer.sendBatchMessage(messages);
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result.put("data",sendResult);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送事物消息
|
||||
*/
|
||||
@PostMapping("/sendThingMessage")
|
||||
private Map sendThingMessage(@RequestParam("topic") String topic,@RequestParam("tag") String tag,@RequestParam("key") String key,@RequestParam("value") String value){
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
//调用MessageProducer配置好的消息方法 topic需要你根据你们业务定制相应的
|
||||
SendResult sendResult = messageProducer.sendThingMessage("order-message","order_timeout_tag","title","content");
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result.put("data",sendResult);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送有序的消息
|
||||
*/
|
||||
@PostMapping("/sendOrderlyMessage")
|
||||
private Map sendOrderlyMessage(){
|
||||
// 根据实际需求创建消息列表并返回
|
||||
List<Message> messages = new ArrayList<>();
|
||||
// 添加消息到列表
|
||||
messages.add(new Message("order-message", "order_timeout_tag", "Message 1".getBytes()));
|
||||
messages.add(new Message("order-message", "order_timeout_tag", "Message 2".getBytes()));
|
||||
messages.add(new Message("order-message", "order_timeout_tag", "Message 3".getBytes()));
|
||||
Integer messageQueueNumber = 3;
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
//调用MessageProducer配置好的消息方法 topic需要你根据你们业务定制相应的
|
||||
SendResult sendResult = messageProducer.sendOrderlyMessage(messages,messageQueueNumber);
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result.put("data",sendResult);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送延迟消息
|
||||
*/
|
||||
@PostMapping("/sendDelayMessage")
|
||||
private Map sendDelayMessage(@RequestParam("topic") String topic,@RequestParam("tag") String tag,@RequestParam("key") String key,@RequestParam("value") String value){
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
//调用MessageProducer配置好的消息方法 topic需要你根据你们业务定制相应的
|
||||
SendResult sendResult = messageProducer.sendDelayMessage("order-message","order_timeout_tag","title","content",4);
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result.put("data",sendResult);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送异步的消息
|
||||
*/
|
||||
@InnerAuth
|
||||
@PostMapping("/sendAsyncProducerMessage")
|
||||
private Map sendAsyncProducerMessage(@RequestParam("topic") String topic,@RequestParam("tag") String tag,@RequestParam("key") String key,@RequestParam("value") String value){
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
//调用MessageProducer配置好的消息方法 topic需要你根据你们业务定制相应的
|
||||
SendResult sendResult = messageProducer.sendAsyncProducerMessage(topic,tag,key,value);
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result.put("data",sendResult);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceMessage {
|
||||
private String clientId;
|
||||
private String dataType;
|
||||
private String data;
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 初始带宽流量对象 initial_bandwidth_traffic
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@Data
|
||||
public class InitialBandwidthTraffic extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 唯一标识ID */
|
||||
private Long id;
|
||||
/** 表名 */
|
||||
private String tableName;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String name;
|
||||
|
||||
/** MAC地址 */
|
||||
@Excel(name = "MAC地址")
|
||||
private String mac;
|
||||
|
||||
/** 运行状态 */
|
||||
@Excel(name = "运行状态")
|
||||
private String status;
|
||||
|
||||
/** 接口类型 */
|
||||
@Excel(name = "接口类型")
|
||||
private String type;
|
||||
|
||||
/** IPv4地址 */
|
||||
@Excel(name = "IPv4地址")
|
||||
private String ipV4;
|
||||
|
||||
/** 入站丢包率(%) */
|
||||
@Excel(name = "入站丢包率(%)")
|
||||
private BigDecimal inDropped;
|
||||
|
||||
/** 出站丢包率(%) */
|
||||
@Excel(name = "出站丢包率(%)")
|
||||
private BigDecimal outDropped;
|
||||
|
||||
/** 接收带宽(bit) */
|
||||
@Excel(name = "接收带宽(bit)")
|
||||
private String inSpeed;
|
||||
|
||||
/** 发送带宽(bit) */
|
||||
@Excel(name = "发送带宽(bit)")
|
||||
private String outSpeed;
|
||||
|
||||
/** 设备唯一标识 */
|
||||
@Excel(name = "设备唯一标识")
|
||||
private String clientId;
|
||||
/** 初始带宽流量集合 */
|
||||
private List<InitialBandwidthTraffic> list;
|
||||
/** 工作模式 */
|
||||
private String duplex;
|
||||
/** 协商速度 */
|
||||
private String speed;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
/** 单位 */
|
||||
private String unit;
|
||||
/** 总接收带宽 */
|
||||
@Excel(name = "总接收带宽")
|
||||
private String totalInSpeed;
|
||||
|
||||
/** 总发送带宽 */
|
||||
@Excel(name = "总发送带宽")
|
||||
private String totalOutSpeed;
|
||||
|
||||
}
|
||||
+252
@@ -0,0 +1,252 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 初始带宽流量临时表对象 initial_bandwidth_traffic_temp
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-05
|
||||
*/
|
||||
public class InitialBandwidthTrafficTemp extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 唯一标识ID */
|
||||
private Long id;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String name;
|
||||
|
||||
/** MAC地址 */
|
||||
@Excel(name = "MAC地址")
|
||||
private String mac;
|
||||
|
||||
/** 运行状态 */
|
||||
@Excel(name = "运行状态")
|
||||
private String status;
|
||||
|
||||
/** 接口类型 */
|
||||
@Excel(name = "接口类型")
|
||||
private String type;
|
||||
|
||||
/** IPv4地址 */
|
||||
@Excel(name = "IPv4地址")
|
||||
private String ipV4;
|
||||
|
||||
/** 入站丢包率(%) */
|
||||
@Excel(name = "入站丢包率(%)")
|
||||
private BigDecimal inDropped;
|
||||
|
||||
/** 出站丢包率(%) */
|
||||
@Excel(name = "出站丢包率(%)")
|
||||
private BigDecimal outDropped;
|
||||
|
||||
/** 接收带宽(big) */
|
||||
@Excel(name = "接收带宽(big)")
|
||||
private String inSpeed;
|
||||
|
||||
/** 发送带宽(bit) */
|
||||
@Excel(name = "发送带宽(bit)")
|
||||
private String outSpeed;
|
||||
|
||||
/** 协商速度 */
|
||||
@Excel(name = "协商速度")
|
||||
private String speed;
|
||||
|
||||
/** 工作模式 */
|
||||
@Excel(name = "工作模式")
|
||||
private String duplex;
|
||||
|
||||
/** 设备唯一标识 */
|
||||
@Excel(name = "设备唯一标识")
|
||||
private String clientId;
|
||||
|
||||
/** 总接收带宽(bit) */
|
||||
@Excel(name = "总接收带宽(bit)")
|
||||
private String totalInSpeed;
|
||||
|
||||
/** 总发送带宽(bit) */
|
||||
@Excel(name = "总发送带宽(bit)")
|
||||
private String totalOutSpeed;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setMac(String mac)
|
||||
{
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
public String getMac()
|
||||
{
|
||||
return mac;
|
||||
}
|
||||
|
||||
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 setIpV4(String ipV4)
|
||||
{
|
||||
this.ipV4 = ipV4;
|
||||
}
|
||||
|
||||
public String getIpV4()
|
||||
{
|
||||
return ipV4;
|
||||
}
|
||||
|
||||
public void setInDropped(BigDecimal inDropped)
|
||||
{
|
||||
this.inDropped = inDropped;
|
||||
}
|
||||
|
||||
public BigDecimal getInDropped()
|
||||
{
|
||||
return inDropped;
|
||||
}
|
||||
|
||||
public void setOutDropped(BigDecimal outDropped)
|
||||
{
|
||||
this.outDropped = outDropped;
|
||||
}
|
||||
|
||||
public BigDecimal getOutDropped()
|
||||
{
|
||||
return outDropped;
|
||||
}
|
||||
|
||||
public void setInSpeed(String inSpeed)
|
||||
{
|
||||
this.inSpeed = inSpeed;
|
||||
}
|
||||
|
||||
public String getInSpeed()
|
||||
{
|
||||
return inSpeed;
|
||||
}
|
||||
|
||||
public void setOutSpeed(String outSpeed)
|
||||
{
|
||||
this.outSpeed = outSpeed;
|
||||
}
|
||||
|
||||
public String getOutSpeed()
|
||||
{
|
||||
return outSpeed;
|
||||
}
|
||||
|
||||
public void setSpeed(String speed)
|
||||
{
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public String getSpeed()
|
||||
{
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setDuplex(String duplex)
|
||||
{
|
||||
this.duplex = duplex;
|
||||
}
|
||||
|
||||
public String getDuplex()
|
||||
{
|
||||
return duplex;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setTotalInSpeed(String totalInSpeed)
|
||||
{
|
||||
this.totalInSpeed = totalInSpeed;
|
||||
}
|
||||
|
||||
public String getTotalInSpeed()
|
||||
{
|
||||
return totalInSpeed;
|
||||
}
|
||||
|
||||
public void setTotalOutSpeed(String totalOutSpeed)
|
||||
{
|
||||
this.totalOutSpeed = totalOutSpeed;
|
||||
}
|
||||
|
||||
public String getTotalOutSpeed()
|
||||
{
|
||||
return totalOutSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("mac", getMac())
|
||||
.append("status", getStatus())
|
||||
.append("type", getType())
|
||||
.append("ipV4", getIpV4())
|
||||
.append("inDropped", getInDropped())
|
||||
.append("outDropped", getOutDropped())
|
||||
.append("inSpeed", getInSpeed())
|
||||
.append("outSpeed", getOutSpeed())
|
||||
.append("speed", getSpeed())
|
||||
.append("duplex", getDuplex())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("clientId", getClientId())
|
||||
.append("totalInSpeed", getTotalInSpeed())
|
||||
.append("totalOutSpeed", getTotalOutSpeed())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* CPU监控信息对象 initial_cpu_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
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;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息对象 initial_disk_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
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;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
/** 换算后的读取次数 */
|
||||
private String readTimesStr;
|
||||
/** 换算后的写入次数 */
|
||||
private String writeTimesStr;
|
||||
/** 换算后的读取字节 */
|
||||
private String readBytesStr;
|
||||
/** 换算后的写入次数 */
|
||||
private String writeBytesStr;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.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;
|
||||
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 心跳信息对象 initial_heartbeat_listen
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-08
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InitialHeartbeatListen extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 客户端ID */
|
||||
private String clientId;
|
||||
/** 节点 */
|
||||
private String logicalNode;
|
||||
/** sn */
|
||||
private String sn;
|
||||
|
||||
/** 强度值 */
|
||||
@Excel(name = "强度值")
|
||||
private Long strength;
|
||||
/** 服务名称 */
|
||||
private String name;
|
||||
/** 版本 */
|
||||
private String version;
|
||||
/** 服务启动时间 */
|
||||
private Long startupTime;
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 心跳信息日志对象 initial_heartbeat_listen_log
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-08
|
||||
*/
|
||||
@Data
|
||||
public class InitialHeartbeatListenLog extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
/** 客户端ID */
|
||||
private String clientId;
|
||||
|
||||
/** 状态0-正常 1-恢复 2-两次丢失 3-三次丢失 */
|
||||
@Excel(name = "状态0-正常 1-恢复 2-两次丢失 3-三次丢失")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.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;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息对象 initial_mount_point_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
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;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
+316
@@ -0,0 +1,316 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 系统其他信息监控数据对象 initial_other_system_monitor_data
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-23
|
||||
*/
|
||||
public class InitialOtherSystemMonitorData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 交换卷/文件的可用空间(字节)采集 */
|
||||
@Excel(name = "交换卷/文件的可用空间", readConverterExp = "字=节")
|
||||
private Long systemSwapSizeFreeCollect;
|
||||
|
||||
/** 可用交换空间百分比采集 */
|
||||
@Excel(name = "可用交换空间百分比采集")
|
||||
private BigDecimal systemSwapSizePercentCollect;
|
||||
|
||||
/** 内存利用率采集 */
|
||||
@Excel(name = "内存利用率采集")
|
||||
private BigDecimal memoryUtilizationCollect;
|
||||
|
||||
/** 可用内存采集 */
|
||||
@Excel(name = "可用内存采集")
|
||||
private Long memorySizeAvailableCollect;
|
||||
|
||||
/** 可用内存百分比采集 */
|
||||
@Excel(name = "可用内存百分比采集")
|
||||
private BigDecimal memorySizePercentCollect;
|
||||
|
||||
/** 总内存采集 */
|
||||
@Excel(name = "总内存采集")
|
||||
private Long memorySizeTotalCollect;
|
||||
|
||||
/** 操作系统采集 */
|
||||
@Excel(name = "操作系统采集")
|
||||
private String systemSwOsCollect;
|
||||
|
||||
/** 操作系统架构采集 */
|
||||
@Excel(name = "操作系统架构采集")
|
||||
private String systemSwArchCollect;
|
||||
|
||||
/** 最大进程数采集 */
|
||||
@Excel(name = "最大进程数采集")
|
||||
private Long kernelMaxprocCollect;
|
||||
|
||||
/** 正在运行的进程数采集 */
|
||||
@Excel(name = "正在运行的进程数采集")
|
||||
private Long procNumRunCollect;
|
||||
|
||||
/** 登录用户数采集 */
|
||||
@Excel(name = "登录用户数采集")
|
||||
private Long systemUsersNumCollect;
|
||||
|
||||
/** 硬盘总可用空间采集 */
|
||||
@Excel(name = "硬盘总可用空间采集")
|
||||
private Long systemDiskSizeTotalCollect;
|
||||
|
||||
/** 系统启动时间采集 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "系统启动时间采集", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date systemBoottimeCollect;
|
||||
|
||||
/** 系统描述采集 */
|
||||
@Excel(name = "系统描述采集")
|
||||
private String systemUnameCollect;
|
||||
|
||||
/** 系统本地时间采集 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "系统本地时间采集", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date systemLocaltimeCollect;
|
||||
|
||||
/** 系统正常运行时间采集 */
|
||||
@Excel(name = "系统正常运行时间采集")
|
||||
private Long systemUptimeCollect;
|
||||
|
||||
/** 进程数采集 */
|
||||
@Excel(name = "进程数采集")
|
||||
private Long procNumCollect;
|
||||
|
||||
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 setSystemSwapSizeFreeCollect(Long systemSwapSizeFreeCollect)
|
||||
{
|
||||
this.systemSwapSizeFreeCollect = systemSwapSizeFreeCollect;
|
||||
}
|
||||
|
||||
public Long getSystemSwapSizeFreeCollect()
|
||||
{
|
||||
return systemSwapSizeFreeCollect;
|
||||
}
|
||||
|
||||
public void setSystemSwapSizePercentCollect(BigDecimal systemSwapSizePercentCollect)
|
||||
{
|
||||
this.systemSwapSizePercentCollect = systemSwapSizePercentCollect;
|
||||
}
|
||||
|
||||
public BigDecimal getSystemSwapSizePercentCollect()
|
||||
{
|
||||
return systemSwapSizePercentCollect;
|
||||
}
|
||||
|
||||
public void setMemoryUtilizationCollect(BigDecimal memoryUtilizationCollect)
|
||||
{
|
||||
this.memoryUtilizationCollect = memoryUtilizationCollect;
|
||||
}
|
||||
|
||||
public BigDecimal getMemoryUtilizationCollect()
|
||||
{
|
||||
return memoryUtilizationCollect;
|
||||
}
|
||||
|
||||
public void setMemorySizeAvailableCollect(Long memorySizeAvailableCollect)
|
||||
{
|
||||
this.memorySizeAvailableCollect = memorySizeAvailableCollect;
|
||||
}
|
||||
|
||||
public Long getMemorySizeAvailableCollect()
|
||||
{
|
||||
return memorySizeAvailableCollect;
|
||||
}
|
||||
|
||||
public void setMemorySizePercentCollect(BigDecimal memorySizePercentCollect)
|
||||
{
|
||||
this.memorySizePercentCollect = memorySizePercentCollect;
|
||||
}
|
||||
|
||||
public BigDecimal getMemorySizePercentCollect()
|
||||
{
|
||||
return memorySizePercentCollect;
|
||||
}
|
||||
|
||||
public void setMemorySizeTotalCollect(Long memorySizeTotalCollect)
|
||||
{
|
||||
this.memorySizeTotalCollect = memorySizeTotalCollect;
|
||||
}
|
||||
|
||||
public Long getMemorySizeTotalCollect()
|
||||
{
|
||||
return memorySizeTotalCollect;
|
||||
}
|
||||
|
||||
public void setSystemSwOsCollect(String systemSwOsCollect)
|
||||
{
|
||||
this.systemSwOsCollect = systemSwOsCollect;
|
||||
}
|
||||
|
||||
public String getSystemSwOsCollect()
|
||||
{
|
||||
return systemSwOsCollect;
|
||||
}
|
||||
|
||||
public void setSystemSwArchCollect(String systemSwArchCollect)
|
||||
{
|
||||
this.systemSwArchCollect = systemSwArchCollect;
|
||||
}
|
||||
|
||||
public String getSystemSwArchCollect()
|
||||
{
|
||||
return systemSwArchCollect;
|
||||
}
|
||||
|
||||
public void setKernelMaxprocCollect(Long kernelMaxprocCollect)
|
||||
{
|
||||
this.kernelMaxprocCollect = kernelMaxprocCollect;
|
||||
}
|
||||
|
||||
public Long getKernelMaxprocCollect()
|
||||
{
|
||||
return kernelMaxprocCollect;
|
||||
}
|
||||
|
||||
public void setProcNumRunCollect(Long procNumRunCollect)
|
||||
{
|
||||
this.procNumRunCollect = procNumRunCollect;
|
||||
}
|
||||
|
||||
public Long getProcNumRunCollect()
|
||||
{
|
||||
return procNumRunCollect;
|
||||
}
|
||||
|
||||
public void setSystemUsersNumCollect(Long systemUsersNumCollect)
|
||||
{
|
||||
this.systemUsersNumCollect = systemUsersNumCollect;
|
||||
}
|
||||
|
||||
public Long getSystemUsersNumCollect()
|
||||
{
|
||||
return systemUsersNumCollect;
|
||||
}
|
||||
|
||||
public void setSystemDiskSizeTotalCollect(Long systemDiskSizeTotalCollect)
|
||||
{
|
||||
this.systemDiskSizeTotalCollect = systemDiskSizeTotalCollect;
|
||||
}
|
||||
|
||||
public Long getSystemDiskSizeTotalCollect()
|
||||
{
|
||||
return systemDiskSizeTotalCollect;
|
||||
}
|
||||
|
||||
public void setSystemBoottimeCollect(Date systemBoottimeCollect)
|
||||
{
|
||||
this.systemBoottimeCollect = systemBoottimeCollect;
|
||||
}
|
||||
|
||||
public Date getSystemBoottimeCollect()
|
||||
{
|
||||
return systemBoottimeCollect;
|
||||
}
|
||||
|
||||
public void setSystemUnameCollect(String systemUnameCollect)
|
||||
{
|
||||
this.systemUnameCollect = systemUnameCollect;
|
||||
}
|
||||
|
||||
public String getSystemUnameCollect()
|
||||
{
|
||||
return systemUnameCollect;
|
||||
}
|
||||
|
||||
public void setSystemLocaltimeCollect(Date systemLocaltimeCollect)
|
||||
{
|
||||
this.systemLocaltimeCollect = systemLocaltimeCollect;
|
||||
}
|
||||
|
||||
public Date getSystemLocaltimeCollect()
|
||||
{
|
||||
return systemLocaltimeCollect;
|
||||
}
|
||||
|
||||
public void setSystemUptimeCollect(Long systemUptimeCollect)
|
||||
{
|
||||
this.systemUptimeCollect = systemUptimeCollect;
|
||||
}
|
||||
|
||||
public Long getSystemUptimeCollect()
|
||||
{
|
||||
return systemUptimeCollect;
|
||||
}
|
||||
|
||||
public void setProcNumCollect(Long procNumCollect)
|
||||
{
|
||||
this.procNumCollect = procNumCollect;
|
||||
}
|
||||
|
||||
public Long getProcNumCollect()
|
||||
{
|
||||
return procNumCollect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("systemSwapSizeFreeCollect", getSystemSwapSizeFreeCollect())
|
||||
.append("systemSwapSizePercentCollect", getSystemSwapSizePercentCollect())
|
||||
.append("memoryUtilizationCollect", getMemoryUtilizationCollect())
|
||||
.append("memorySizeAvailableCollect", getMemorySizeAvailableCollect())
|
||||
.append("memorySizePercentCollect", getMemorySizePercentCollect())
|
||||
.append("memorySizeTotalCollect", getMemorySizeTotalCollect())
|
||||
.append("systemSwOsCollect", getSystemSwOsCollect())
|
||||
.append("systemSwArchCollect", getSystemSwArchCollect())
|
||||
.append("kernelMaxprocCollect", getKernelMaxprocCollect())
|
||||
.append("procNumRunCollect", getProcNumRunCollect())
|
||||
.append("systemUsersNumCollect", getSystemUsersNumCollect())
|
||||
.append("systemDiskSizeTotalCollect", getSystemDiskSizeTotalCollect())
|
||||
.append("systemBoottimeCollect", getSystemBoottimeCollect())
|
||||
.append("systemUnameCollect", getSystemUnameCollect())
|
||||
.append("systemLocaltimeCollect", getSystemLocaltimeCollect())
|
||||
.append("systemUptimeCollect", getSystemUptimeCollect())
|
||||
.append("procNumCollect", getProcNumCollect())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 风扇信息对象 initial_switch_fan_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
public class InitialSwitchFanInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 风扇索引 */
|
||||
@Excel(name = "风扇索引")
|
||||
private String fanEntIndex;
|
||||
|
||||
/** 风扇名称 */
|
||||
@Excel(name = "风扇名称")
|
||||
private String fanName;
|
||||
|
||||
/** 风扇状态 */
|
||||
@Excel(name = "风扇状态")
|
||||
private String fanEntityFanState;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setFanEntIndex(String fanEntIndex)
|
||||
{
|
||||
this.fanEntIndex = fanEntIndex;
|
||||
}
|
||||
|
||||
public String getFanEntIndex()
|
||||
{
|
||||
return fanEntIndex;
|
||||
}
|
||||
|
||||
public void setFanName(String fanName)
|
||||
{
|
||||
this.fanName = fanName;
|
||||
}
|
||||
|
||||
public String getFanName()
|
||||
{
|
||||
return fanName;
|
||||
}
|
||||
|
||||
public void setFanEntityFanState(String fanEntityFanState)
|
||||
{
|
||||
this.fanEntityFanState = fanEntityFanState;
|
||||
}
|
||||
|
||||
public String getFanEntityFanState()
|
||||
{
|
||||
return fanEntityFanState;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("fanEntIndex", getFanEntIndex())
|
||||
.append("fanName", getFanName())
|
||||
.append("fanEntityFanState", getFanEntityFanState())
|
||||
.append("clientId", getClientId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息对象 initial_switch_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InitialSwitchInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 名称 */
|
||||
@JsonProperty("ifDescr")
|
||||
private String name;
|
||||
/** 接收流量 */
|
||||
@JsonProperty("ifHCInOctets")
|
||||
private BigDecimal inBytes;
|
||||
/** 发送流量 */
|
||||
@JsonProperty("ifHCOutOctets")
|
||||
private BigDecimal outBytes;
|
||||
/** 状态 */
|
||||
@JsonProperty("ifOperStatus")
|
||||
private String status;
|
||||
/** 类型 */
|
||||
@JsonProperty("ifType")
|
||||
private String type;
|
||||
/** 接收流量(bytes/s) */
|
||||
private BigDecimal inSpeed;
|
||||
/** 发送流量(bytes/s) */
|
||||
private BigDecimal outSpeed;
|
||||
/** 交换机ip */
|
||||
private String switchIp;
|
||||
/** 端口配置速率(Mbps) */
|
||||
private String ifSpeed;
|
||||
/** 入站丢包 */
|
||||
private String ifInDiscards;
|
||||
/** 出站丢包 */
|
||||
private String ifOutDiscards;
|
||||
/** 错误的入站数据包数量 */
|
||||
private String ifInErrors;
|
||||
/** 错误的出站数据包数量 */
|
||||
private String ifOutErrors;
|
||||
/** 端口索引 */
|
||||
private String ifIndex;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
/** 计算方式 */
|
||||
private String calculationMode;
|
||||
/* 单位 */
|
||||
private String unit;
|
||||
/** 表名 */
|
||||
private String tableName;
|
||||
/** 批量新增集合 */
|
||||
private List<InitialSwitchInfo> list;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 交换机监控信息对象 initial_switch_info_temp
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Data
|
||||
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;
|
||||
/** 交换机ip */
|
||||
private String switchIp;
|
||||
/** 端口配置速率(Mbps) */
|
||||
private String ifSpeed;
|
||||
/** 入站丢包 */
|
||||
private String ifInDiscards;
|
||||
/** 出站丢包 */
|
||||
private String ifOutDiscards;
|
||||
/** 错误的入站数据包数量 */
|
||||
private String ifInErrors;
|
||||
/** 错误的出站数据包数量 */
|
||||
private String ifOutErrors;
|
||||
/** 端口索引 */
|
||||
private String ifIndex;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* MPU信息对象 initial_switch_mpu_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchMpuInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** MPU索引 */
|
||||
@Excel(name = "MPU索引")
|
||||
private String mpuEntIndex;
|
||||
|
||||
/** MPU名称 */
|
||||
@Excel(name = "MPU名称")
|
||||
private String mpuName;
|
||||
|
||||
/** MPU的CPU使用率(%) */
|
||||
@Excel(name = "MPU的CPU使用率(%)")
|
||||
private BigDecimal mpuEntityCpuUsage;
|
||||
|
||||
/** MPU的内存使用率(%) */
|
||||
@Excel(name = "MPU的内存使用率(%)")
|
||||
private BigDecimal mpuEntityMemUsage;
|
||||
|
||||
/** MPU的操作系统 */
|
||||
@Excel(name = "MPU的操作系统")
|
||||
private String mpuPhysicalSoftwareRev;
|
||||
|
||||
/** MPU的温度(℃) */
|
||||
@Excel(name = "MPU的温度(℃)")
|
||||
private BigDecimal mpuEntityTemperature;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 光模块信息对象 initial_switch_optical_module
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchOpticalModule extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 光模块端口索引 */
|
||||
@Excel(name = "光模块端口索引")
|
||||
private String fiberEntIndex;
|
||||
|
||||
/** 光模块端口名称 */
|
||||
@Excel(name = "光模块端口名称")
|
||||
private String fiberPortName;
|
||||
|
||||
/** 光模块发送光衰阈值(dBm) */
|
||||
@Excel(name = "光模块发送光衰阈值(dBm)")
|
||||
private BigDecimal hwEntityOpticalTxLowThreshold;
|
||||
|
||||
/** 光模块接收光衰阈值(dBm) */
|
||||
@Excel(name = "光模块接收光衰阈值(dBm)")
|
||||
private BigDecimal hwEntityOpticalRxLowThreshold;
|
||||
|
||||
/** 光模块接收功率(dBm) */
|
||||
@Excel(name = "光模块接收功率(dBm)")
|
||||
private BigDecimal hwEntityOpticalRxPower;
|
||||
|
||||
/** 光模块发送功率(dBm) */
|
||||
@Excel(name = "光模块发送功率(dBm)")
|
||||
private BigDecimal hwEntityOpticalTxPower;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 交换机系统其他信息采集数据对象 initial_switch_other_collect_data
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-23
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchOtherCollectData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 采集类型 */
|
||||
@Excel(name = "采集类型")
|
||||
private String collectType;
|
||||
|
||||
/** 采集值 */
|
||||
@Excel(name = "采集值")
|
||||
private String collectValue;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 电源信息对象 initial_switch_power_supply
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchPowerSupply extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 电源索引 */
|
||||
@Excel(name = "电源索引")
|
||||
private String pwrEntIndex;
|
||||
|
||||
/** 电源名称 */
|
||||
@Excel(name = "电源名称")
|
||||
private String pwrName;
|
||||
|
||||
/** 电源状态 */
|
||||
@Excel(name = "电源状态")
|
||||
private String pwrEntityPwrState;
|
||||
|
||||
/** 电源电流(mA) */
|
||||
@Excel(name = "电源电流(mA)")
|
||||
private Long pwrEntityPwrCurrent;
|
||||
|
||||
/** 电源电压(mV) */
|
||||
@Excel(name = "电源电压(mV)")
|
||||
private Long pwrEntityPwrVoltage;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.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;
|
||||
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 交换机系统其他信息采集数据对象 initial_system_other_collect_data
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-23
|
||||
*/
|
||||
@Data
|
||||
public class InitialSystemOtherCollectData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 采集类型 */
|
||||
@Excel(name = "采集类型")
|
||||
private String collectType;
|
||||
|
||||
/** 采集值 */
|
||||
@Excel(name = "采集值")
|
||||
private String collectValue;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.tongran.system.api.domain.NetworkInfo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class NetworkInfoDeserializer extends JsonDeserializer<List<NetworkInfo>> {
|
||||
// 添加无参构造函数(Jackson 需要)
|
||||
public NetworkInfoDeserializer() {
|
||||
}
|
||||
@Override
|
||||
public List<NetworkInfo> deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
||||
ObjectMapper mapper = (ObjectMapper) p.getCodec();
|
||||
JsonNode node = mapper.readTree(p);
|
||||
|
||||
// 如果 networkInfo 是字符串(如日志中的情况),先解析字符串
|
||||
if (node.isTextual()) {
|
||||
String jsonStr = node.textValue();
|
||||
return mapper.readValue(jsonStr, new TypeReference<List<NetworkInfo>>() {});
|
||||
}
|
||||
// 如果 networkInfo 是数组,直接解析
|
||||
else if (node.isArray()) {
|
||||
return mapper.readValue(node.traverse(), new TypeReference<List<NetworkInfo>>() {});
|
||||
}
|
||||
throw new IOException("Invalid networkInfo format");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Agent管理对象 rm_agent_management
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@Data
|
||||
public class RmAgentManagement extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 硬件SN码 */
|
||||
@Excel(name = "硬件SN码")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 资源名称 */
|
||||
@Excel(name = "资源名称")
|
||||
private String resourceName;
|
||||
|
||||
/** 内网IP地址 */
|
||||
@Excel(name = "内网IP地址")
|
||||
private String internalIp;
|
||||
|
||||
/** Agent状态:0-离线,1-在线,2-异常 */
|
||||
@Excel(name = "Agent状态:0-离线,1-在线,2-异常")
|
||||
private String status;
|
||||
|
||||
/** Agent版本号 */
|
||||
@Excel(name = "Agent版本号")
|
||||
private String agentVersion;
|
||||
|
||||
/** 执行方式 */
|
||||
@Excel(name = "执行方式")
|
||||
private Integer method;
|
||||
|
||||
/** 定时更新时间(cron表达式) */
|
||||
@Excel(name = "定时更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date scheduledUpdateTime;
|
||||
/** 文件地址格式 */
|
||||
@Excel(name = "文件地址格式")
|
||||
private Long fileUrlType;
|
||||
|
||||
/** 文件地址 */
|
||||
@Excel(name = "文件地址")
|
||||
private String fileUrl;
|
||||
/** 文件目录 */
|
||||
@Excel(name = "文件目录")
|
||||
private String fileDirectory;
|
||||
|
||||
/** 最后一次更新结果(success/failure) */
|
||||
@Excel(name = "最后一次更新结果", readConverterExp = "s=uccess/failure")
|
||||
private String lastUpdateResult;
|
||||
|
||||
/** 最后一次更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "最后一次更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastUpdateTime;
|
||||
/** 生效服务器id */
|
||||
private String includeIds;
|
||||
/** 生效服务器名称 */
|
||||
private String includeNames;
|
||||
/** 查询条件名称 */
|
||||
private String queryName;
|
||||
/** 文件MD5 */
|
||||
private String fileMd5;
|
||||
/** 客户端id */
|
||||
private String clientId;
|
||||
/** 部署设备 */
|
||||
private String deployDevice;
|
||||
/** 管理网公网Ip */
|
||||
private String managePublicIp;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 客户端告警信息对象 rm_alarm_log
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-10
|
||||
*/
|
||||
@Data
|
||||
public class RmAlarmLog extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 告警时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "告警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date alarmTime;
|
||||
|
||||
/** 管理网-公网IP */
|
||||
@Excel(name = "管理网-公网IP")
|
||||
private String mgmPublicIp;
|
||||
|
||||
/** 告警类型 */
|
||||
@Excel(name = "告警类型")
|
||||
private String alarmType;
|
||||
|
||||
/** 告警内容 */
|
||||
@Excel(name = "告警内容")
|
||||
private String alarmContent;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 告警策略对象 rm_alarm_policy
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@Data
|
||||
public class RmAlarmPolicy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 告警策略名称 */
|
||||
@Excel(name = "告警策略名称")
|
||||
private String alarmName;
|
||||
|
||||
/** 策略描述 */
|
||||
@Excel(name = "策略描述")
|
||||
private String alarmDescription;
|
||||
|
||||
/** 关联的资源组ID */
|
||||
@Excel(name = "关联的资源组ID")
|
||||
private Long resourceGroupId;
|
||||
/** 关联资源组名称*/
|
||||
private String resourceGroupName;
|
||||
/** 包含设备 */
|
||||
private String resourceName;
|
||||
|
||||
/** 状态:0-禁用,1-启用 */
|
||||
@Excel(name = "状态:0-禁用,1-启用")
|
||||
private String status;
|
||||
|
||||
/** 策略下发时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "策略下发时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deployTime;
|
||||
/** 告警策略内容*/
|
||||
private List<RmAlarmRule> alarmRuleList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 告警推送配置对象 rm_alarm_push_config
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-11
|
||||
*/
|
||||
@Data
|
||||
public class RmAlarmPushConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 配置名称 */
|
||||
@Excel(name = "配置名称")
|
||||
private String configName;
|
||||
|
||||
/** 推送方式 */
|
||||
@Excel(name = "推送方式")
|
||||
private String pushMethod;
|
||||
|
||||
/** 推送地址 */
|
||||
@Excel(name = "推送地址")
|
||||
private String pushAddress;
|
||||
|
||||
/** 推送告警类型 */
|
||||
@Excel(name = "推送告警类型")
|
||||
private String pushAlarmTypes;
|
||||
|
||||
/** 消息内容 */
|
||||
@Excel(name = "消息内容")
|
||||
private String messageContent;
|
||||
|
||||
/** 消息提示人手机号 */
|
||||
@Excel(name = "消息提示人手机号")
|
||||
private String contactPhones;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 告警记录对象 rm_alarm_record
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@Data
|
||||
public class RmAlarmRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID/设备ID */
|
||||
@Excel(name = "客户端ID/设备ID")
|
||||
private String clientId;
|
||||
|
||||
/** 资源名称 */
|
||||
@Excel(name = "资源名称")
|
||||
private String resourceName;
|
||||
|
||||
/** 源IP地址 */
|
||||
@Excel(name = "源IP地址")
|
||||
private String sourceIp;
|
||||
|
||||
/** 告警发生时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "告警发生时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date occurTime;
|
||||
|
||||
/** 告警详细内容 */
|
||||
@Excel(name = "告警详细内容")
|
||||
private String content;
|
||||
|
||||
/** 重复告警次数 */
|
||||
@Excel(name = "重复告警次数")
|
||||
private Long repeatCount;
|
||||
|
||||
/** 状态:0-未处理,1-已处理 */
|
||||
@Excel(name = "状态:0-未处理,1-已处理")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 告警规则对象 rm_alarm_rule
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
@Data
|
||||
public class RmAlarmRule extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 关联的告警策略ID */
|
||||
@Excel(name = "关联的告警策略ID")
|
||||
private Long alarmPolicyId;
|
||||
|
||||
/** 规则名称 */
|
||||
@Excel(name = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
/** 监控指标键 */
|
||||
@Excel(name = "监控指标键")
|
||||
private String metricKey;
|
||||
|
||||
/** 比较运算符(>, <, >=, <=, =, !=) */
|
||||
@Excel(name = "比较运算符", readConverterExp = ">=,,<=,,>==,,<==,,==,,!==")
|
||||
private String operator;
|
||||
|
||||
/** 告警阈值 */
|
||||
@Excel(name = "告警阈值")
|
||||
private BigDecimal threshold;
|
||||
|
||||
/** 资源类型(linux/switch) */
|
||||
@Excel(name = "资源类型", readConverterExp = "l=inux/switch")
|
||||
private String resourceType;
|
||||
|
||||
/** 状态:0-禁用,1-启用 */
|
||||
@Excel(name = "状态:0-禁用,1-启用")
|
||||
private String status;
|
||||
|
||||
/** 端口白名单 */
|
||||
@Excel(name = "端口白名单")
|
||||
private String portWhitelist;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 告警规则模板对象 rm_alarm_rule_template
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-12
|
||||
*/
|
||||
public class RmAlarmRuleTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 规则名称 */
|
||||
@Excel(name = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
/** 监控指标键 */
|
||||
@Excel(name = "监控指标键")
|
||||
private String metricKey;
|
||||
|
||||
/** 资源类型(linux/switch) */
|
||||
@Excel(name = "资源类型", readConverterExp = "l=inux/switch")
|
||||
private String resourceType;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName)
|
||||
{
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public String getRuleName()
|
||||
{
|
||||
return ruleName;
|
||||
}
|
||||
|
||||
public void setMetricKey(String metricKey)
|
||||
{
|
||||
this.metricKey = metricKey;
|
||||
}
|
||||
|
||||
public String getMetricKey()
|
||||
{
|
||||
return metricKey;
|
||||
}
|
||||
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("ruleName", getRuleName())
|
||||
.append("metricKey", getMetricKey())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器脚本策略对象 rm_deployment_policy
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@Data
|
||||
public class RmDeploymentPolicy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 策略ID */
|
||||
private Long id;
|
||||
|
||||
/** 策略名称 */
|
||||
@Excel(name = "策略名称")
|
||||
private String policyName;
|
||||
|
||||
/** 策略描述 */
|
||||
@Excel(name = "策略描述")
|
||||
private String description;
|
||||
|
||||
/** 关联资源组ID */
|
||||
@Excel(name = "关联资源组ID")
|
||||
private Long resourceGroupId;
|
||||
|
||||
/** 包含的设备ID列表(逗号分隔) */
|
||||
private String includedDevicesId;
|
||||
/** 包含设备 */
|
||||
@Excel(name = "包含设备")
|
||||
private String includedDevicesName;
|
||||
|
||||
/** 源文件地址格式 */
|
||||
@Excel(name = "源文件地址格式")
|
||||
private String sourceFilePathType;
|
||||
/** 源文件路径 */
|
||||
@Excel(name = "源文件路径")
|
||||
private String sourceFilePath;
|
||||
|
||||
/** 目标目录 */
|
||||
@Excel(name = "目标目录")
|
||||
private String targetDirectory;
|
||||
|
||||
/** 命令执行内容 */
|
||||
@Excel(name = "命令执行内容")
|
||||
private String commandContent;
|
||||
|
||||
/** 0=立即执行,1=定时执行 */
|
||||
@Excel(name = "执行方式", readConverterExp = "0=立即执行,1=定时执行")
|
||||
private Integer executionMethod;
|
||||
|
||||
/** 定时执行时间 */
|
||||
@Excel(name = "定时执行时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date scheduledTime;
|
||||
/** 定时执行时间(时间戳秒) */
|
||||
private Long policyTime;
|
||||
|
||||
/** 策略状态:0-未下发,1-已下发 */
|
||||
@Excel(name = "策略状态:0-未下发,1-已下发")
|
||||
private String policyStatus;
|
||||
|
||||
/** 策略下发时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "策略下发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deployTime;
|
||||
|
||||
/** 脚本类型 */
|
||||
@Excel(name = "脚本类型")
|
||||
private String scriptType;
|
||||
/** 资源组名称 */
|
||||
private String resourceGroupName;
|
||||
/** 资源组置空 */
|
||||
private Boolean resourceGroupIdNull;
|
||||
/** 部署设备 */
|
||||
private String deployDevice;
|
||||
/** 业务脚本id */
|
||||
private Long scriptId;
|
||||
/** 业务脚本名称 */
|
||||
private String scriptName;
|
||||
/** 业务脚本文件地址 */
|
||||
private String scriptPath;
|
||||
/** 业务脚本参数 */
|
||||
private String defaultParams;
|
||||
/** 业务下发名称 */
|
||||
private String taskName;
|
||||
/** 不在线数量 */
|
||||
private Integer offlineNum;
|
||||
/** 执行成功数量 */
|
||||
private Integer sucessNum;
|
||||
/** 执行失败数量 */
|
||||
private Integer failNum;
|
||||
/** 不在线服务器clientId集合 */
|
||||
private List<String> offlineClientIds;
|
||||
/** 执行成功clientId集合 */
|
||||
private List<String> sucessClientIds;
|
||||
/** 执行失败clientIdji和 */
|
||||
private List<String> failClientIds;
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文件信息对象 rm_file_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
public class RmFileInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 文件ID */
|
||||
private Long id;
|
||||
|
||||
/** 文件名称 */
|
||||
@Excel(name = "文件名称")
|
||||
private String name;
|
||||
|
||||
/** 文件类型(如:jpg、pdf、exe等) */
|
||||
@Excel(name = "文件类型", readConverterExp = "如=:jpg、pdf、exe等")
|
||||
private String type;
|
||||
|
||||
/** 文件描述 */
|
||||
@Excel(name = "文件描述")
|
||||
private String description;
|
||||
|
||||
/** 文件大小(KB) */
|
||||
@Excel(name = "文件大小", readConverterExp = "K=B")
|
||||
private Long fileSize;
|
||||
|
||||
/** 文件MD5值 */
|
||||
@Excel(name = "文件MD5值")
|
||||
private String md5;
|
||||
|
||||
/** 文件存储路径 */
|
||||
@Excel(name = "文件存储路径")
|
||||
private String path;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setFileSize(Long fileSize)
|
||||
{
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public Long getFileSize()
|
||||
{
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setMd5(String md5)
|
||||
{
|
||||
this.md5 = md5;
|
||||
}
|
||||
|
||||
public String getMd5()
|
||||
{
|
||||
return md5;
|
||||
}
|
||||
|
||||
public void setPath(String path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("type", getType())
|
||||
.append("description", getDescription())
|
||||
.append("fileSize", getFileSize())
|
||||
.append("md5", getMd5())
|
||||
.append("path", getPath())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 基础监控项对象 rm_initial_monitor_item
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
public class RmInitialMonitorItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 监控项类型(监控项,自动发现项) */
|
||||
@Excel(name = "监控项类型(监控项,自动发现项)")
|
||||
private String itemType;
|
||||
|
||||
/** 监控标识(唯一键) */
|
||||
@Excel(name = "监控标识(唯一键)")
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
@Excel(name = "监控名称")
|
||||
private String metricName;
|
||||
|
||||
/** 监控OID */
|
||||
@Excel(name = "监控OID")
|
||||
private String oid;
|
||||
|
||||
/** 过滤值 */
|
||||
@Excel(name = "过滤值")
|
||||
private String filterValue;
|
||||
|
||||
/** 监控说明 */
|
||||
@Excel(name = "监控说明")
|
||||
private String monitorDescription;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 资源类型 */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
/** 采集周期 */
|
||||
@Excel(name = "采集周期")
|
||||
private String collectionCycle;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import com.tongran.rocketmq.domain.vo.RmMonitorPolicyVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源监控策略对象 rm_monitor_policy
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorPolicy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 策略名称 */
|
||||
@Excel(name = "策略名称")
|
||||
private String policyName;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 资源组ID */
|
||||
private Long resourceGroupId;
|
||||
/** 资源组名称 */
|
||||
@Excel(name = "关联资源组")
|
||||
private String resourceGroupName;
|
||||
/** 模板ID */
|
||||
private Long templateId;
|
||||
/** 模板名称 */
|
||||
@Excel(name = "关联监控模板")
|
||||
private String templateName;
|
||||
|
||||
/** 状态:0-待下发,1-已下发 */
|
||||
@Excel(name = "策略状态", readConverterExp = "0=待下发,1=已下发")
|
||||
private String status;
|
||||
|
||||
/** 下发策略时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "下发策略时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deployTime;
|
||||
/** 采集周期及id集合 */
|
||||
private List<RmMonitorPolicyVo> collectionAndIdList;
|
||||
/** 资源类型,linux switch */
|
||||
private String resourceType;
|
||||
/** 查询条件名称 */
|
||||
private String queryName;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间")
|
||||
private Date createTime;
|
||||
/** 修改时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "修改时间")
|
||||
private Date updateTime;
|
||||
/** 交换机类型 */
|
||||
private String switchType;
|
||||
/** 部署设备 */
|
||||
private String deployDevice;
|
||||
/** 优先级 */
|
||||
private String priority;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 监控模板对象 rm_monitor_template
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 模板名称 */
|
||||
@Excel(name = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
/** 模板描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 监控项 */
|
||||
@Excel(name = "监控项")
|
||||
private String monitorItems;
|
||||
|
||||
/** 自动发现项 */
|
||||
@Excel(name = "自动发现项")
|
||||
private String discoveryRules;
|
||||
|
||||
/** 资源组ID */
|
||||
private Long resourceGroupId;
|
||||
/** 资源组名称 */
|
||||
@Excel(name = "关联资源组")
|
||||
private String resourceGroupName;
|
||||
/** 资源类型(linux,switch) */
|
||||
private String resourcyType;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间")
|
||||
private Date createTime;
|
||||
/** 修改时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 客户端网络接口信息对象 rm_network_interface
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
public class RmNetworkInterface extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 运营商 */
|
||||
@Excel(name = "运营商")
|
||||
private String isp;
|
||||
|
||||
/** 省 */
|
||||
@Excel(name = "省")
|
||||
private String province;
|
||||
|
||||
/** 市 */
|
||||
@Excel(name = "市")
|
||||
private String city;
|
||||
|
||||
/** 公网IP */
|
||||
@Excel(name = "公网IP")
|
||||
private String publicIp;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
|
||||
/** MAC地址 */
|
||||
@Excel(name = "MAC地址")
|
||||
private String macAddress;
|
||||
|
||||
/** 接口类型 */
|
||||
@Excel(name = "接口类型")
|
||||
private String interfaceType;
|
||||
|
||||
/** IPv4地址 */
|
||||
@Excel(name = "IPv4地址")
|
||||
private String ipv4Address;
|
||||
|
||||
/** 网关 */
|
||||
@Excel(name = "网关")
|
||||
private String gateway;
|
||||
/** 绑定ip 1业务IP,2管理ip */
|
||||
private String bindIp;
|
||||
/** 是否为新信息 */
|
||||
private Integer newFlag;
|
||||
/** 服务器clientId集合 */
|
||||
private String clientIds;
|
||||
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 客户端策略关联对象 rm_policy_device_details
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public class RmPolicyDeviceDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 策略ID */
|
||||
@Excel(name = "策略ID")
|
||||
private String policyId;
|
||||
|
||||
/** 脚本ID */
|
||||
@Excel(name = "脚本ID")
|
||||
private String scriptId;
|
||||
|
||||
/** 版本ID */
|
||||
@Excel(name = "版本ID")
|
||||
private String versionId;
|
||||
|
||||
/** 状态(0-未下发,1-已下发) */
|
||||
@Excel(name = "状态(0-未下发,1-已下发)")
|
||||
private String policyStatus;
|
||||
|
||||
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 setPolicyId(String policyId)
|
||||
{
|
||||
this.policyId = policyId;
|
||||
}
|
||||
|
||||
public String getPolicyId()
|
||||
{
|
||||
return policyId;
|
||||
}
|
||||
|
||||
public void setScriptId(String scriptId)
|
||||
{
|
||||
this.scriptId = scriptId;
|
||||
}
|
||||
|
||||
public String getScriptId()
|
||||
{
|
||||
return scriptId;
|
||||
}
|
||||
|
||||
public void setVersionId(String versionId)
|
||||
{
|
||||
this.versionId = versionId;
|
||||
}
|
||||
|
||||
public String getVersionId()
|
||||
{
|
||||
return versionId;
|
||||
}
|
||||
|
||||
public void setPolicyStatus(String policyStatus)
|
||||
{
|
||||
this.policyStatus = policyStatus;
|
||||
}
|
||||
|
||||
public String getPolicyStatus()
|
||||
{
|
||||
return policyStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("policyId", getPolicyId())
|
||||
.append("scriptId", getScriptId())
|
||||
.append("versionId", getVersionId())
|
||||
.append("policyStatus", getPolicyStatus())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资源远程管理对象 rm_resource_remote
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@Data
|
||||
public class RmResourceRemote extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 资源ID */
|
||||
private Long id;
|
||||
|
||||
/** 硬件SN码 */
|
||||
@Excel(name = "硬件SN码")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 资源类型 */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
|
||||
/** 资源名称 */
|
||||
@Excel(name = "资源名称")
|
||||
private String resourceName;
|
||||
|
||||
/** 资源描述 */
|
||||
@Excel(name = "资源描述")
|
||||
private String description;
|
||||
|
||||
/** 内网IP地址 */
|
||||
@Excel(name = "内网IP地址")
|
||||
private String internalIp;
|
||||
|
||||
/** 外网IP地址 */
|
||||
@Excel(name = "外网IP地址")
|
||||
private String externalIp;
|
||||
|
||||
/** 管理端口号 */
|
||||
@Excel(name = "管理端口号")
|
||||
private Integer managementPort;
|
||||
|
||||
/** 在线状态:0-离线,1-在线 */
|
||||
@Excel(name = "在线状态:0-离线,1-在线")
|
||||
private String onlineStatus;
|
||||
|
||||
/** 连接方式(SSH/Telnet/RDP等) */
|
||||
@Excel(name = "连接方式", readConverterExp = "S=SH/Telnet/RDP等")
|
||||
private String connectionMethod;
|
||||
/** 脚本执行结果 */
|
||||
private String commandResult;
|
||||
/** 客户端id */
|
||||
private String clientId;
|
||||
/** 执行结果标识(0 失败 1成功) */
|
||||
private Integer resultFlag;
|
||||
/** 脚本id */
|
||||
private Long scriptId;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Linux系统监控项对象 rm_template_linux
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmTemplateLinux extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 关联的模板ID */
|
||||
@Excel(name = "关联的模板ID")
|
||||
private Long templateId;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long policyId;
|
||||
|
||||
/** 监控项类型 */
|
||||
@Excel(name = "监控项类型")
|
||||
private String itemType;
|
||||
|
||||
/** 监控标识(唯一键) */
|
||||
@Excel(name = "监控标识(唯一键)")
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
@Excel(name = "监控名称")
|
||||
private String metricName;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 监控状态(0-禁用,1启用) */
|
||||
@Excel(name = "监控状态(0-禁用,1启用)")
|
||||
private String monitorStatus;
|
||||
/** 采集周期 */
|
||||
private Long collectionCycle;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 交换机监控模板对象 rm_template_switch
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmTemplateSwitch extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 关联的模板ID */
|
||||
@Excel(name = "关联的模板ID")
|
||||
private Long templateId;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long policyId;
|
||||
|
||||
/** 监控项类型 */
|
||||
@Excel(name = "监控项类型")
|
||||
private String itemType;
|
||||
|
||||
/** 监控标识(唯一键) */
|
||||
@Excel(name = "监控标识(唯一键)")
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
@Excel(name = "监控名称")
|
||||
private String metricName;
|
||||
|
||||
/** 监控OID(SNMP标识) */
|
||||
@Excel(name = "监控OID(SNMP标识)")
|
||||
private String oid;
|
||||
|
||||
/** 过滤值(用于特定端口或接口过滤) */
|
||||
@Excel(name = "过滤值(用于特定端口或接口过滤)")
|
||||
private String filterValue;
|
||||
|
||||
/** 监控说明 */
|
||||
@Excel(name = "监控说明")
|
||||
private String switchDescription;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 监控状态(0-禁用,1启用) */
|
||||
@Excel(name = "监控状态(0-禁用,1启用)")
|
||||
private String monitorStatus;
|
||||
/** 采集周期 */
|
||||
private Long collectionCycle;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AgentUpdateMsgVo {
|
||||
/**文件地址,外网HTTP(S)地址 */
|
||||
private String fileUrl;
|
||||
/** 文件MD5 */
|
||||
private String fileMd5;
|
||||
/** 执行方式:0、立即执行;1、定时执行; */
|
||||
private Integer method;
|
||||
/** 定时时间,执行方式为1、定时执行时该字段必传 */
|
||||
private long policyTime;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
public class AgentUpdateVo {
|
||||
/**文件地址,外网HTTP(S)地址 */
|
||||
private String fileUrl;
|
||||
/** 保存文件地址 */
|
||||
private String filePath;
|
||||
/** 执行命令,List<String>格式Json字符串 */
|
||||
private String commands;
|
||||
/** 执行方式:0、立即执行;1、定时执行; */
|
||||
private Integer method;
|
||||
/** 定时时间,执行方式为1、定时执行时该字段必传 */
|
||||
private long policyTime;
|
||||
/** 时间戳 */
|
||||
private long timestamp = Instant.now().getEpochSecond();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class AlarmVo {
|
||||
/** 规则类型 */
|
||||
private String type;
|
||||
/** 是否开启 */
|
||||
private boolean collect = false;
|
||||
/** 比较运算符 */
|
||||
private String operator;
|
||||
/** 阈值 */
|
||||
private BigDecimal threshold;
|
||||
/** 是否启用 */
|
||||
private String status;
|
||||
/** 端口白名单 */
|
||||
private String portWhitelist;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CollectDataVo {
|
||||
/** 类型 */
|
||||
private String type;
|
||||
/** 数据 */
|
||||
private String value;
|
||||
/** 交换机ip */
|
||||
private String switchIp;
|
||||
/** 时间戳 */
|
||||
private long timestamp;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CollectVo {
|
||||
/** 采集类型 */
|
||||
private String type;
|
||||
/** 是否采集 */
|
||||
private boolean collect = false;
|
||||
/** 采集周期 */
|
||||
private Long interval = 300L;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
public class PolicyTypeVo {
|
||||
|
||||
/** 服务器监控策略信息 */
|
||||
private String monitors;
|
||||
/** 服务器脚本策略信息 */
|
||||
private String scripts;
|
||||
/** agent更新信息 */
|
||||
private String versions;
|
||||
/** 路由信息 */
|
||||
private String routes;
|
||||
/** 时间戳 */
|
||||
private Long timestamp = Instant.now().getEpochSecond();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PolicyVo<T> {
|
||||
/** 更新时间戳 */
|
||||
private Long upTime = Instant.now().getEpochSecond();
|
||||
/** 更新内容 */
|
||||
private List<T> contents;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.tongran.rocketmq.domain.NetworkInfoDeserializer;
|
||||
import com.tongran.system.api.domain.NetworkInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RegisterMsgVo {
|
||||
@JsonProperty("clientId")
|
||||
private String clientId;
|
||||
|
||||
@JsonProperty("sn")
|
||||
private String sn;
|
||||
|
||||
@JsonProperty("networkInfo")
|
||||
@JsonDeserialize(using = NetworkInfoDeserializer.class)
|
||||
private List<NetworkInfo> networkInfo;
|
||||
|
||||
@JsonProperty("timestamp")
|
||||
private long timestamp;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
public class RegisterSwitchVo {
|
||||
/** 服务器ip */
|
||||
private String clientIp;
|
||||
/** 服务器端口 */
|
||||
private Integer clientPort;
|
||||
/** 交换机信息 */
|
||||
private SwitchOidVo switchBoard;
|
||||
/** 时间戳(秒) */
|
||||
private long timestamp = Instant.now().getEpochSecond();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资源监控策略对象 rm_monitor_policy
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorPolicyVo
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 采集周期 */
|
||||
private Long collectionCycle;
|
||||
/** 是否采集 */
|
||||
private String monitorStatus;
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 监控模板对象 rm_monitor_template业务类
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorTemplateVo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 模板名称 */
|
||||
private String templateName;
|
||||
|
||||
/** 模板描述 */
|
||||
private String description;
|
||||
|
||||
/** 监控项 */
|
||||
private String monitorItems;
|
||||
|
||||
/** 自动发现项 */
|
||||
private String discoveryRules;
|
||||
|
||||
/** 资源组ID */
|
||||
private Long resourceGroupId;
|
||||
|
||||
/** 关联的模板ID */
|
||||
private Long templateId;
|
||||
/** 监控项类型 */
|
||||
private String itemType;
|
||||
/** 监控标识(唯一键) */
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
private String metricName;
|
||||
|
||||
/** 数据类型 */
|
||||
private String dataType;
|
||||
|
||||
/** 监控状态(0-禁用,1启用) */
|
||||
private String monitorStatus;
|
||||
/** 监控OID(SNMP标识) */
|
||||
private String oid;
|
||||
|
||||
/** 过滤值(用于特定端口或接口过滤) */
|
||||
private String filterValue;
|
||||
|
||||
/** 监控说明 */
|
||||
private String switchDescription;
|
||||
/**
|
||||
* 资源类型,linux,switch
|
||||
*/
|
||||
private String resourceType;
|
||||
/**
|
||||
* 监控ids
|
||||
*/
|
||||
private Long[] monitorIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RspResultVo {
|
||||
/** 脚本策略id */
|
||||
private String scriptId;
|
||||
/** 命令 */
|
||||
private String command;
|
||||
/** 命令执行结果 */
|
||||
private String resOut;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class RspVo {
|
||||
/**
|
||||
* 状态码,0、失败;1、成功
|
||||
*/
|
||||
private Integer resCode;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String resMag;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String resMsg;
|
||||
|
||||
private String result;
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
private Long timestamp = Instant.now().getEpochSecond();
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ScriptPolicyVo {
|
||||
/**
|
||||
* 策略名称
|
||||
*/
|
||||
private String policyName;
|
||||
/**
|
||||
* 文件
|
||||
*/
|
||||
private List<ScriptFile> files;
|
||||
|
||||
// 目标路径地址
|
||||
private String filePath;
|
||||
|
||||
// 命令
|
||||
private List<String> commands;
|
||||
|
||||
// 执行方式:0、立即执行;1、定时执行;
|
||||
private int method;
|
||||
|
||||
// 执行方式为1、定时执行时必传-指定时间
|
||||
private long policyTime;
|
||||
// 时间戳
|
||||
private long timestamp = Instant.now().getEpochSecond();
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ScriptFile{
|
||||
|
||||
//文件类型:0、平台文件地址;1、外网HTTP(S)
|
||||
private int fileType;
|
||||
|
||||
//文件类型为1、外网HTTP(S)时必传
|
||||
private String fileUrl;
|
||||
|
||||
//文件类型为0、平台文件地址时必传(文件名)
|
||||
private String fileName;
|
||||
|
||||
//文件类型为0、平台文件地址时必传(文件流)
|
||||
private String fileData;
|
||||
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ServerScriptPolicyVo {
|
||||
/** 服务器脚本策略id */
|
||||
private String scriptId;
|
||||
/** 策略名称 */
|
||||
private String policyName;
|
||||
/** 外网Http(s)地址 */
|
||||
private String fileUrl;
|
||||
/** 脚本参数 */
|
||||
private String commandParams;
|
||||
/** 执行方式 */
|
||||
private int method;
|
||||
/** 定时时间 精确到秒的时间戳 */
|
||||
private Long policyTime;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.snmp4j.mp.SnmpConstants;
|
||||
import org.snmp4j.security.SecurityLevel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class SwitchOidVo {
|
||||
private Map<String, String> netOID;
|
||||
private Map<String, String> moduleOID;
|
||||
private Map<String, String> mpuOID;
|
||||
private Map<String, String> pwrOID;
|
||||
private Map<String, String> fanOID;
|
||||
private Map<String, String> otherOID;
|
||||
/** 团体名 */
|
||||
private String community;
|
||||
/** ip地址 */
|
||||
private String ip;
|
||||
/** 端口 */
|
||||
private Integer port;
|
||||
/** 过滤值 */
|
||||
private Map<String, List<String>> filters;
|
||||
|
||||
private int version = SnmpConstants.version2c; // 默认v2c
|
||||
private int timeout = 5000;
|
||||
private int retries = 2;
|
||||
|
||||
// SNMP v3特有参数
|
||||
private String securityName;
|
||||
private String authProtocol;
|
||||
private String authPassword;
|
||||
private String privProtocol;
|
||||
private String privPassword;
|
||||
private int securityLevel = SecurityLevel.AUTH_PRIV;
|
||||
/**
|
||||
* 判断是否为SNMP v3
|
||||
*/
|
||||
public boolean isV3() {
|
||||
return version == SnmpConstants.version3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.tongran.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class SystemMsgVo {
|
||||
|
||||
/** 总内存(GB) */
|
||||
private Long memoryTotal;
|
||||
/** 操作系统 */
|
||||
private String os;
|
||||
/** 操作系统架构 */
|
||||
private String arch;
|
||||
/** 最大进程数 */
|
||||
private Long maxProc;
|
||||
/** 硬盘总可用空间(GB) */
|
||||
private BigDecimal diskSizeTotal;
|
||||
/** 系统启动时间(Unix时间戳) */
|
||||
private Long bootTime;
|
||||
/** 系统描述(如Linux 5.4.0-80-generic) */
|
||||
private String uname;
|
||||
/** 系统本地时间(如2023-08-15 14:30:00) */
|
||||
private String localTime;
|
||||
/** 系统正常运行时间(秒) */
|
||||
private Long upTime;
|
||||
/** cpu数量 */
|
||||
private Long num;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.tongran.rocketmq.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum AlarmTypeEnum {
|
||||
服务器下线("1", "服务器下线"),
|
||||
交换机下线("2", "交换机下线");
|
||||
private final String code;
|
||||
private final String msg;
|
||||
AlarmTypeEnum(String code, String msg){
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.tongran.rocketmq.enums;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 用于传递topic和 tag
|
||||
* 也用于接收消息后判断不同的消息处理不同的业务
|
||||
*/
|
||||
@Getter
|
||||
public enum MessageCodeEnum {
|
||||
|
||||
/**
|
||||
* agent数据采集的信息
|
||||
*/
|
||||
AGENT_MESSAGE_TOPIC("agent_up","agent数据采集的信息topic"),
|
||||
|
||||
TONGRAN_AGENT_UP("tongran_agent_up","agent数据采集的信息topic"),
|
||||
|
||||
TR_AGENT_UP("tr_agent_up","agent数据采集的信息topic v1.1"),
|
||||
|
||||
/**
|
||||
* 系统消息
|
||||
*/
|
||||
NOTE_MESSAGE_TOPIC("system-message","系统消息服务模块topic名称"),
|
||||
/**
|
||||
* 用户消息
|
||||
*/
|
||||
USER_MESSAGE_TOPIC("user-message","用户消息服务模块topic名称"),
|
||||
|
||||
/**
|
||||
* 订单消息
|
||||
*/
|
||||
ORDER_MESSAGE_TOPIC("order-message","订单消息服务模块topic名称"),
|
||||
|
||||
/**
|
||||
* 用户消息tag
|
||||
*/
|
||||
USER_MESSAGE_TAG("user_message_tag","用户消息推送"),
|
||||
|
||||
/**
|
||||
* 系统消息tag
|
||||
*/
|
||||
NOTE_MESSAGE_TAG("system_message_tag","系统消息推送"),
|
||||
|
||||
/**
|
||||
* 订单消息
|
||||
*/
|
||||
ORDER_MESSAGE_TAG("order_message_tag","订单消息推送"),
|
||||
|
||||
/**
|
||||
* 订单处理编号
|
||||
*/
|
||||
ORDER_TIMEOUT_TAG("order_timeout_tag","订单超时处理");
|
||||
|
||||
|
||||
private final String code;
|
||||
private final String msg;
|
||||
|
||||
MessageCodeEnum(String code, String msg){
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user