新增 虚拟机工具类,exe执行代码
parent
90d5743c35
commit
8800a7e07a
@ -1,30 +0,0 @@
|
|||||||
package com.docus.server.common;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.redis.listener.RedisKeyExpirationListener;
|
|
||||||
import com.docus.server.service.impl.RedisKeyExpirationService;
|
|
||||||
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class RedisCollectorTaskKeyExpirationListener extends RedisKeyExpirationListener {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private RedisKeyExpirationService redisKeyExpirationService;
|
|
||||||
|
|
||||||
public RedisCollectorTaskKeyExpirationListener(RedisMessageListenerContainer listenerContainer) {
|
|
||||||
super(listenerContainer);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void processExpireKey(String expireKey) {
|
|
||||||
redisKeyExpirationService.expired(expireKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean validExpireKey(String expireKey) {
|
|
||||||
return expireKey.startsWith("schCollectorRecord:noRetryTask:expireKey:")
|
|
||||||
|| expireKey.startsWith("schCollectorRecord:isRetryTask:expireKey:");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
package com.docus.server.common;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchTerminator;
|
|
||||||
import com.docus.server.enums.BusyStateEnum;
|
|
||||||
import com.docus.server.enums.OnlineStateEnum;
|
|
||||||
import com.docus.server.service.ISchTerminatorService;
|
|
||||||
import org.springframework.context.ApplicationListener;
|
|
||||||
import org.springframework.context.event.ContextRefreshedEvent;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重启置空
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
public class TerminatorListener implements ApplicationListener<ContextRefreshedEvent> {
|
|
||||||
@Resource
|
|
||||||
private ISchTerminatorService iSchTerminatorService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
|
||||||
List<SchTerminator> terminators = iSchTerminatorService.findAll();
|
|
||||||
terminators.forEach(p -> {
|
|
||||||
p.setBusyState(BusyStateEnum.IDLE);
|
|
||||||
p.setOnlineState(OnlineStateEnum.OFFLINE);
|
|
||||||
});
|
|
||||||
iSchTerminatorService.batchUpdate(terminators);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.docus.server.common.netty;
|
||||||
|
|
||||||
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.Attribute;
|
||||||
|
import io.netty.util.AttributeKey;
|
||||||
|
|
||||||
|
public class ChannelAttribute<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性键名称
|
||||||
|
*/
|
||||||
|
private AttributeKey<T> attributeKey;
|
||||||
|
|
||||||
|
public ChannelAttribute(String key) {
|
||||||
|
this.attributeKey = AttributeKey.valueOf(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置属性
|
||||||
|
*
|
||||||
|
* @param ctx 通道上下文
|
||||||
|
* @param value 值
|
||||||
|
*/
|
||||||
|
public void setAttribute(ChannelHandlerContext ctx, T value) {
|
||||||
|
Attribute<T> attribute = getAttribute(ctx);
|
||||||
|
attribute.set(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取属性值
|
||||||
|
*
|
||||||
|
* @param ctx 通道上下文
|
||||||
|
* @return 属性值 有可能为 null
|
||||||
|
*/
|
||||||
|
public T getAttributeValue(ChannelHandlerContext ctx) {
|
||||||
|
Attribute<T> attribute = getAttribute(ctx);
|
||||||
|
T value = attribute.get();
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 永远不会返回 null
|
||||||
|
*
|
||||||
|
* @param ctx channel 上下
|
||||||
|
* @return ctx 关联的 channle 的 attribute
|
||||||
|
*/
|
||||||
|
private Attribute<T> getAttribute(ChannelHandlerContext ctx) {
|
||||||
|
return ctx.channel().attr(attributeKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,104 +1,97 @@
|
|||||||
package com.docus.server.common.netty.server.handler;
|
//package com.docus.server.common.netty.server.handler;
|
||||||
|
//
|
||||||
import com.docus.core.util.Func;
|
//import com.docus.core.util.Func;
|
||||||
import com.docus.core.util.StringUtils;
|
//import com.docus.core.util.StringUtils;
|
||||||
import com.docus.core.util.json.JSON;
|
//import com.docus.core.util.json.JSON;
|
||||||
import com.docus.server.common.MsgConstants;
|
//import com.docus.server.common.MsgConstants;
|
||||||
import com.docus.server.common.netty.CommMsg;
|
//import com.docus.server.common.netty.CommMsg;
|
||||||
import com.docus.server.common.netty.server.ChannelRepository;
|
//import com.docus.server.common.netty.server.ChannelRepository;
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.NettyTerminatorDTO;
|
//import io.netty.buffer.ByteBuf;
|
||||||
import com.docus.server.enums.BusyStateEnum;
|
//import io.netty.channel.ChannelHandler;
|
||||||
import com.docus.server.enums.OnlineStateEnum;
|
//import io.netty.channel.ChannelHandlerContext;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
//import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||||
import io.netty.buffer.ByteBuf;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import io.netty.channel.ChannelHandler;
|
//
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
//import java.io.Serializable;
|
||||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
//import java.net.InetSocketAddress;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//
|
||||||
|
///**
|
||||||
import java.net.InetSocketAddress;
|
// * 客户端和服务端心跳
|
||||||
|
// */
|
||||||
/**
|
//@Slf4j
|
||||||
* 客户端和服务端心跳
|
//@ChannelHandler.Sharable
|
||||||
*/
|
//public class NettyHeartbeatHandler extends ChannelInboundHandlerAdapter {
|
||||||
@Slf4j
|
//
|
||||||
@ChannelHandler.Sharable
|
// @Override
|
||||||
public class NettyHeartbeatHandler extends ChannelInboundHandlerAdapter {
|
// public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
|
||||||
|
// ByteBuf buf = (ByteBuf) msg;
|
||||||
@Override
|
// //创建目标大小的数组
|
||||||
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
|
// byte[] barray = new byte[buf.readableBytes()];
|
||||||
ByteBuf buf = (ByteBuf) msg;
|
// //把数据从bytebuf转移到byte[]
|
||||||
//创建目标大小的数组
|
// buf.getBytes(0, barray);
|
||||||
byte[] barray = new byte[buf.readableBytes()];
|
// //将byte[]转成字符串用于打印
|
||||||
//把数据从bytebuf转移到byte[]
|
// String message = new String(barray);
|
||||||
buf.getBytes(0, barray);
|
// //空消息不处理
|
||||||
//将byte[]转成字符串用于打印
|
// if (!StringUtils.hasText(message)) {
|
||||||
String message = new String(barray);
|
// return;
|
||||||
//空消息不处理
|
// }
|
||||||
if (!StringUtils.hasText(message)) {
|
//
|
||||||
return;
|
// CommMsg commMsg = JSON.fromJSON(message, CommMsg.class);
|
||||||
}
|
//
|
||||||
|
// String messageType = commMsg.getMessageType();
|
||||||
CommMsg<TerminatorContent> commMsg = JSON.fromJSONWithGeneric(message, new TypeReference<CommMsg<TerminatorContent>>() {
|
// String messageTime = commMsg.getMessageTime();
|
||||||
});
|
// Serializable messageContent = commMsg.getContent();
|
||||||
|
//
|
||||||
String messageType = commMsg.getMessageType();
|
// if (messageType.equals(MsgConstants.HEARTBEAT_REQUEST)) {
|
||||||
String messageTime = commMsg.getMessageTime();
|
//
|
||||||
TerminatorContent messageContent = commMsg.getContent();
|
// log.info("接收到客户端的心跳");
|
||||||
|
//
|
||||||
if (messageType.equals(MsgConstants.HEARTBEAT_REQUEST)) {
|
//
|
||||||
|
// log.info("接受到【采集器-终端】的心跳消息:消息类型={},消息时间={},消息内容={}", messageType, messageTime, messageContent);
|
||||||
log.info("接收到客户端的心跳");
|
//
|
||||||
|
// InetSocketAddress ipSocket = (InetSocketAddress) ctx.channel().remoteAddress();
|
||||||
|
// String clientIp = ipSocket.getAddress().getHostAddress();
|
||||||
log.info("接受到【采集器-终端】的心跳消息:消息类型={},消息时间={},消息内容={}", messageType, messageTime, messageContent);
|
//
|
||||||
|
// log.info("【采集器-终端IP】:{},连接上线,IP地址信息:{}", clientIp, clientIp);
|
||||||
InetSocketAddress ipSocket = (InetSocketAddress) ctx.channel().remoteAddress();
|
//
|
||||||
String clientIp = ipSocket.getAddress().getHostAddress();
|
// String clientKey = repository.getClientKey(ctx.channel());
|
||||||
|
//
|
||||||
log.info("【采集器-终端IP】:{},连接上线,IP地址信息:{}", clientIp, clientIp);
|
// if (Func.isNotBlank(clientKey)) {
|
||||||
|
//
|
||||||
String clientKey = repository.getClientKey(ctx.channel());
|
// //将ip和channel进行映射
|
||||||
|
// repository.put(clientKey, ctx.channel());
|
||||||
if (Func.isNotBlank(clientKey)) {
|
// }
|
||||||
|
//
|
||||||
NettyTerminatorDTO nettyTerminatorDTO = new NettyTerminatorDTO();
|
// } else {
|
||||||
nettyTerminatorDTO.setTerminatorIp(clientIp);
|
//
|
||||||
nettyTerminatorDTO.setBusyState(BusyStateEnum.IDLE);
|
// if (ctx.channel().isOpen()) {
|
||||||
nettyTerminatorDTO.setOnlineState(OnlineStateEnum.ONLINE);
|
// //触发下一个handler
|
||||||
|
// ctx.fireChannelRead(msg);
|
||||||
//将ip和channel进行映射
|
// }
|
||||||
repository.put(nettyTerminatorDTO, ctx.channel());
|
// }
|
||||||
}
|
//
|
||||||
|
// }
|
||||||
} else {
|
//
|
||||||
|
// private ChannelRepository repository;
|
||||||
if (ctx.channel().isOpen()) {
|
//
|
||||||
//触发下一个handler
|
// public NettyHeartbeatHandler(ChannelRepository repository) {
|
||||||
ctx.fireChannelRead(msg);
|
// this.repository = repository;
|
||||||
}
|
// }
|
||||||
}
|
//
|
||||||
|
//
|
||||||
}
|
//
|
||||||
|
// @Override
|
||||||
private ChannelRepository repository;
|
// public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
|
// cause.printStackTrace();
|
||||||
public NettyHeartbeatHandler(ChannelRepository repository) {
|
// String clientId = repository.getClientKey(ctx.channel());
|
||||||
this.repository = repository;
|
// log.error("通道发生异常,终端连接:{}", clientId);
|
||||||
}
|
// //移除终端,终端离线
|
||||||
|
// if (clientId != null) {
|
||||||
@Override
|
// repository.remove(clientId);
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
// }
|
||||||
cause.printStackTrace();
|
// if (ctx.channel().isActive()) {
|
||||||
String clientId = repository.getClientKey(ctx.channel());
|
// ctx.close();
|
||||||
log.error("通道发生异常,终端连接:{}", clientId);
|
// }
|
||||||
//移除终端,终端离线
|
// super.exceptionCaught(ctx, cause);
|
||||||
if (clientId != null) {
|
// }
|
||||||
repository.remove(clientId);
|
//}
|
||||||
}
|
|
||||||
if (ctx.channel().isActive()) {
|
|
||||||
ctx.close();
|
|
||||||
}
|
|
||||||
super.exceptionCaught(ctx, cause);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.docus.server.common.netty.state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe:所有状态类的基类
|
||||||
|
*/
|
||||||
|
public abstract class AbstractState implements IDeviceState {
|
||||||
|
protected DeviceStateContext stateCtx;
|
||||||
|
|
||||||
|
public AbstractState(DeviceStateContext stateCtx) {
|
||||||
|
this.stateCtx = stateCtx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConnect(long connectedTime, String describe) {
|
||||||
|
throw new IllegalStateException(getStateName() + " 此状态不应该进行链接动作");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisconnect(String describe) {
|
||||||
|
throw new IllegalStateException(getStateName() + " 此状态不应该进行断开链接动作");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoginSucc(String deviceId, long lastUpdateTime, long heartRate, String describe) {
|
||||||
|
throw new IllegalStateException(getStateName() + " 此状态不应该进行登录动作");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoginFailed(String describe) {
|
||||||
|
throw new IllegalStateException(getStateName() + " 此状态不应该进行登录失败动作");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onHeartbeat(long lastUpdateTime, String describe) {
|
||||||
|
throw new IllegalStateException(getStateName() + " 此状态不应该进行心跳动作");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTimeout(String describe) {
|
||||||
|
throw new IllegalStateException(getStateName() + " 此状态不应该进行进入超时动作");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,239 @@
|
|||||||
|
package com.docus.server.common.netty.state;
|
||||||
|
|
||||||
|
import io.netty.channel.Channel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe:设备状态切换类
|
||||||
|
*/
|
||||||
|
public class DeviceStateContext implements IDeviceState {
|
||||||
|
/**
|
||||||
|
* 是否开启记录所有的状态转变
|
||||||
|
*/
|
||||||
|
boolean history;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录状态转换的历史
|
||||||
|
*/
|
||||||
|
private static class HistoryInfoDTO {
|
||||||
|
private String describe;
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
public HistoryInfoDTO(String describe, String state) {
|
||||||
|
this.describe = describe;
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "HistoryInfoDTO{" +
|
||||||
|
"describe='" + describe + '\'' +
|
||||||
|
", state='" + state + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<HistoryInfoDTO> historyState = new ArrayList<>();
|
||||||
|
/**
|
||||||
|
* 防止竞争的读写锁
|
||||||
|
*/
|
||||||
|
ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备的上下文信息
|
||||||
|
*/
|
||||||
|
private Channel channel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备的 deviceId
|
||||||
|
*/
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 链接时间
|
||||||
|
*/
|
||||||
|
|
||||||
|
private long connectTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备的上次更新时间
|
||||||
|
*/
|
||||||
|
private long lastUpdateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心跳周期 单位 s
|
||||||
|
*/
|
||||||
|
private long heartRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备当前状态
|
||||||
|
*/
|
||||||
|
private IDeviceState state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param channel 管理的 channel 信息
|
||||||
|
*/
|
||||||
|
public DeviceStateContext(Channel channel) {
|
||||||
|
this.channel = channel;
|
||||||
|
setState(new NoConnectedState(this), "初始化");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param channel 管理的 channel 信息
|
||||||
|
* @param history true 开始记录历史状态
|
||||||
|
*/
|
||||||
|
public DeviceStateContext(Channel channel, boolean history) {
|
||||||
|
this.history = history;
|
||||||
|
this.channel = channel;
|
||||||
|
setState(new NoConnectedState(this), "初始化");
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////get/set////////////////////////
|
||||||
|
|
||||||
|
public Channel getChannel() {
|
||||||
|
return channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannel(Channel channel) {
|
||||||
|
this.channel = channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceId() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(String deviceId) {
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getConnectTime() {
|
||||||
|
return connectTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectTime(long connectTime) {
|
||||||
|
this.connectTime = connectTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getLastUpdateTime() {
|
||||||
|
return lastUpdateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpdateTime(long lastUpdateTime) {
|
||||||
|
this.lastUpdateTime = lastUpdateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getHeartRate() {
|
||||||
|
return heartRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeartRate(long heartRate) {
|
||||||
|
this.heartRate = heartRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IDeviceState getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(IDeviceState state, String describe) {
|
||||||
|
this.state = state;
|
||||||
|
//把每次切换的状态加入到历史状态中
|
||||||
|
historyState.add(new HistoryInfoDTO(describe, state.getStateName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////状态切换////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConnect(long connectTime, String describe) {
|
||||||
|
lock.writeLock().lock();
|
||||||
|
try {
|
||||||
|
state.onConnect(connectTime, describe);
|
||||||
|
} finally {
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisconnect(String describe) {
|
||||||
|
lock.writeLock().lock();
|
||||||
|
try {
|
||||||
|
state.onDisconnect(describe);
|
||||||
|
} finally {
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoginSucc(String deviceId, long lastUpdateTime, long heartRate, String describe) throws IllegalStateException {
|
||||||
|
lock.writeLock().lock();
|
||||||
|
try {
|
||||||
|
state.onLoginSucc(deviceId, lastUpdateTime, heartRate, describe);
|
||||||
|
} finally {
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoginFailed(String describe) {
|
||||||
|
lock.writeLock().lock();
|
||||||
|
try {
|
||||||
|
state.onLoginFailed(describe);
|
||||||
|
} finally {
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onHeartbeat(long lastUpdateTime, String describe) {
|
||||||
|
lock.writeLock().lock();
|
||||||
|
try {
|
||||||
|
state.onHeartbeat(lastUpdateTime, describe);
|
||||||
|
} finally {
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTimeout(String describe) {
|
||||||
|
lock.writeLock().lock();
|
||||||
|
try {
|
||||||
|
state.onTimeout(describe);
|
||||||
|
} finally {
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStateName() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭链接
|
||||||
|
*/
|
||||||
|
protected void closeChannle(String describe) {
|
||||||
|
setState(new NoConnectedState(this), describe);
|
||||||
|
//关闭此 channel
|
||||||
|
this.channel.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "DeviceStateContext{" +
|
||||||
|
" state=" + state.getStateName() +
|
||||||
|
", channel=" + channel +
|
||||||
|
", deviceId='" + deviceId + '\'' +
|
||||||
|
", connectTime=" + connectTime +
|
||||||
|
", lastUpdateTime=" + lastUpdateTime +
|
||||||
|
", lock=" + lock +
|
||||||
|
", \nhistory=" + historyState +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.docus.server.common.netty.state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe:
|
||||||
|
*/
|
||||||
|
public class LoggedState extends AbstractState {
|
||||||
|
public LoggedState(DeviceStateContext stateCtx) {
|
||||||
|
super(stateCtx);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisconnect(String describe) {
|
||||||
|
//直接关闭链接
|
||||||
|
this.stateCtx.closeChannle(describe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onHeartbeat(long lastUpdateTime, String describe) {
|
||||||
|
//把当前状态放进去
|
||||||
|
this.stateCtx.setState(this, describe);
|
||||||
|
//状态不变更新 lastUpdateTime
|
||||||
|
this.stateCtx.setLastUpdateTime(lastUpdateTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTimeout(String describe) {
|
||||||
|
//状态模式设置为超时状态
|
||||||
|
this.stateCtx.setState(new TimeoutState(this.stateCtx), describe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStateName() {
|
||||||
|
return "logged";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.docus.server.common.netty.state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe:未连接状态
|
||||||
|
*/
|
||||||
|
public class NoConnectedState extends AbstractState {
|
||||||
|
public NoConnectedState(DeviceStateContext ctx) {
|
||||||
|
super(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConnect(long connectedTime, String describe) {
|
||||||
|
stateCtx.setConnectTime(connectedTime);
|
||||||
|
stateCtx.setState(new NoLoginState(this.stateCtx), describe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisconnect(String describe) {
|
||||||
|
this.stateCtx.closeChannle(describe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStateName() {
|
||||||
|
return "noConnected";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.docus.server.common.netty.state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe:未登录状态
|
||||||
|
*/
|
||||||
|
public class NoLoginState extends AbstractState {
|
||||||
|
public NoLoginState(DeviceStateContext ctx) {
|
||||||
|
super(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisconnect(String describe) {
|
||||||
|
this.stateCtx.closeChannle(describe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoginSucc(String deviceId, long lastUpdateTime, long heartRate, String describe) {
|
||||||
|
//设置数据
|
||||||
|
this.stateCtx.setDeviceId(deviceId);
|
||||||
|
this.stateCtx.setLastUpdateTime(lastUpdateTime);
|
||||||
|
this.stateCtx.setHeartRate(heartRate);
|
||||||
|
//状态转移
|
||||||
|
this.stateCtx.setState(new LoggedState(this.stateCtx), describe);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onLoginFailed(String describe) {
|
||||||
|
// //为登录模式下,登录失败,直接断开链接。
|
||||||
|
// this.stateCtx.closeChannle(describe);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onTimeout(String describe) {
|
||||||
|
// //在未登录状态下,超时无数据,直接断开链接
|
||||||
|
// this.stateCtx.closeChannle(describe);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStateName() {
|
||||||
|
return "noLogin";
|
||||||
|
}
|
||||||
|
}
|
@ -1,152 +0,0 @@
|
|||||||
package com.docus.server.common.process;
|
|
||||||
|
|
||||||
import com.docus.core.util.Func;
|
|
||||||
import com.docus.log.context.TrackContext;
|
|
||||||
import com.docus.log.processor.AbstractProcessor;
|
|
||||||
import com.docus.server.common.netty.server.ChannelRepository;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.EditSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.EditSchTerminatorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.NettyTerminatorDTO;
|
|
||||||
import com.docus.server.enums.BusyStateEnum;
|
|
||||||
import com.docus.server.enums.RetryTaskEnum;
|
|
||||||
import com.docus.server.enums.StateEnum;
|
|
||||||
import com.docus.server.service.ISchCollectRecordRetryLogService;
|
|
||||||
import com.docus.server.service.ISchCollectRecordService;
|
|
||||||
import com.docus.server.service.ISchTerminatorService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecord.SchCollectRecordVO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecordretrylog.SchCollectRecordRetryLogVO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schterminator.SchTerminatorVO;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* channel 管理
|
|
||||||
*/
|
|
||||||
public class ChannelProcessor extends AbstractProcessor {
|
|
||||||
@Resource
|
|
||||||
private ChannelRepository channelRepository;
|
|
||||||
@Resource
|
|
||||||
private ISchTerminatorService iSchTerminatorService;
|
|
||||||
@Resource
|
|
||||||
private ISchCollectRecordService iSchCollectRecordService;
|
|
||||||
@Resource
|
|
||||||
private ISchCollectRecordRetryLogService iSchCollectRecordRetryLogService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Object doProcess(TrackContext context) {
|
|
||||||
String group = context.getGroup();
|
|
||||||
|
|
||||||
switch (group) {
|
|
||||||
case "SchCollectRecordController-edit":
|
|
||||||
return doSchCollectRecordControllerEdit(context);
|
|
||||||
case "SchTerminatorController":
|
|
||||||
return doSchTerminatorController(context);
|
|
||||||
case "RedisKeyExpirationService-expired":
|
|
||||||
return doRedisKeyExpired(context);
|
|
||||||
default:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Object doRedisKeyExpired(TrackContext context) {
|
|
||||||
boolean error = context.isError();
|
|
||||||
String expireKey = (String) context.getArgs()[0];
|
|
||||||
|
|
||||||
String recordId = expireKey.substring(expireKey.lastIndexOf(":") + 1);
|
|
||||||
|
|
||||||
if (!error) {
|
|
||||||
|
|
||||||
if (expireKey.startsWith("schCollectorRecord:isRetryTask:expireKey:")) {
|
|
||||||
retryTask(recordId);
|
|
||||||
}
|
|
||||||
if (expireKey.startsWith("schCollectorRecord:noRetryTask:expireKey:")) {
|
|
||||||
noRetryTask(recordId);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean doSchCollectRecordControllerEdit(TrackContext context) {
|
|
||||||
return logCollectRecord(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean doSchTerminatorController(TrackContext context) {
|
|
||||||
return logTerminator(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean logCollectRecord(TrackContext context) {
|
|
||||||
boolean error = context.isError();
|
|
||||||
|
|
||||||
EditSchCollectRecordDTO collectRecordDTO = (EditSchCollectRecordDTO) context.getArgs()[0];
|
|
||||||
|
|
||||||
if (!error) {
|
|
||||||
|
|
||||||
if (RetryTaskEnum.NO_RETRY_TASK.equals(collectRecordDTO.getIsRetryTask())) {
|
|
||||||
|
|
||||||
noRetryTask(String.valueOf(collectRecordDTO.getId()));
|
|
||||||
|
|
||||||
} else if (RetryTaskEnum.RETRY_TASK.equals(collectRecordDTO.getIsRetryTask())) {
|
|
||||||
|
|
||||||
retryTask(String.valueOf(collectRecordDTO.getId()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void retryTask(String recordLogId) {
|
|
||||||
SchCollectRecordRetryLogVO retryLogVO = iSchCollectRecordRetryLogService.findById(recordLogId);
|
|
||||||
|
|
||||||
updateTerminatorState(retryLogVO.getTerminatorId(), retryLogVO.getTaskExecState());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void noRetryTask(String recordId) {
|
|
||||||
|
|
||||||
SchCollectRecordVO schCollectRecordVO = iSchCollectRecordService.findById(recordId);
|
|
||||||
|
|
||||||
updateTerminatorState(schCollectRecordVO.getTerminatorId(), schCollectRecordVO.getTaskExecState());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateTerminatorState(Long terminatorId, StateEnum taskExecState) {
|
|
||||||
SchTerminatorVO schTerminatorVO = iSchTerminatorService.findById(String.valueOf(terminatorId));
|
|
||||||
|
|
||||||
NettyTerminatorDTO nettyTerminatorDTO = channelRepository.getTerminatorByIp(String.valueOf(schTerminatorVO.getTerminatorIp()));
|
|
||||||
|
|
||||||
if (Func.isEmpty(nettyTerminatorDTO)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<StateEnum> stateEnums = Arrays.asList(StateEnum.values());
|
|
||||||
|
|
||||||
if (stateEnums.contains(taskExecState)) {
|
|
||||||
nettyTerminatorDTO.setBusyState(BusyStateEnum.IDLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean logTerminator(TrackContext context) {
|
|
||||||
boolean error = context.isError();
|
|
||||||
EditSchTerminatorDTO terminatorDTO = (EditSchTerminatorDTO) context.getArgs()[0];
|
|
||||||
if (!error) {
|
|
||||||
SchTerminatorVO terminatorVO = iSchTerminatorService.findById(String.valueOf(terminatorDTO.getId()));
|
|
||||||
|
|
||||||
NettyTerminatorDTO nettyTerminatorDTO = channelRepository.getTerminatorByIp(terminatorVO.getTerminatorIp());
|
|
||||||
|
|
||||||
if (Func.isNotBlank(terminatorDTO.getOnlyCollectorIds())) {
|
|
||||||
List<String> onlyList = Arrays.stream(terminatorDTO.getOnlyCollectorIds().split(",")).map(String::valueOf).collect(Collectors.toList());
|
|
||||||
nettyTerminatorDTO.setOnlyCollectorIds(onlyList);
|
|
||||||
}
|
|
||||||
if (Func.isNotBlank(terminatorDTO.getPriorityCollectorIds())) {
|
|
||||||
List<String> priList = Arrays.stream(terminatorDTO.getPriorityCollectorIds().split(",")).map(String::valueOf).collect(Collectors.toList());
|
|
||||||
nettyTerminatorDTO.setPriorityCollectorIds(priList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
package com.docus.server.common.process;
|
|
||||||
|
|
||||||
import com.docus.core.util.json.JSON;
|
|
||||||
import com.docus.log.context.TrackContext;
|
|
||||||
import com.docus.log.processor.AbstractProcessor;
|
|
||||||
import com.docus.server.common.MsgConstants;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.UpdateSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.CommMsgDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionFile;
|
|
||||||
import com.docus.server.service.ICommMsgService;
|
|
||||||
import com.docus.server.service.ISchCollectorVersionFileService;
|
|
||||||
import com.docus.server.service.ISchCollectorVersionService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversion.SchCollectorVersionVO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversion.TcpSchCollectorVersionContentVO;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* tcp 管理
|
|
||||||
*/
|
|
||||||
public class TcpProcessor extends AbstractProcessor {
|
|
||||||
@Resource
|
|
||||||
private ICommMsgService iCommMsgService;
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorVersionFileService iSchCollectorVersionFileService;
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorVersionService iSchCollectorVersionService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Object doProcess(TrackContext context) {
|
|
||||||
return logProcess(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean logProcess(TrackContext context) {
|
|
||||||
boolean error = context.isError();
|
|
||||||
if (!error) {
|
|
||||||
UpdateSchCollectorDTO updateSchCollectorDTO = (UpdateSchCollectorDTO) context.getArgs()[0];
|
|
||||||
Long collectorId = updateSchCollectorDTO.getCollectorId();
|
|
||||||
Long collectorVersionId = updateSchCollectorDTO.getCollectorVersionId();
|
|
||||||
|
|
||||||
SchCollectorVersionFile schCollectorVersionFile = iSchCollectorVersionFileService.findByCollectorIdAndVersionId(collectorId, collectorVersionId);
|
|
||||||
SchCollectorVersionVO schCollectorVersionVO = iSchCollectorVersionService.findById(String.valueOf(collectorVersionId));
|
|
||||||
|
|
||||||
TcpSchCollectorVersionContentVO tcpSchCollectorVersionContentVO = new TcpSchCollectorVersionContentVO();
|
|
||||||
tcpSchCollectorVersionContentVO.setCollectorId(collectorId);
|
|
||||||
tcpSchCollectorVersionContentVO.setFilePath(schCollectorVersionFile.getFilePath());
|
|
||||||
tcpSchCollectorVersionContentVO.setCollectorVersion(schCollectorVersionVO.getCollectVersion());
|
|
||||||
|
|
||||||
List<TcpSchCollectorVersionContentVO> tcpSchCollectorVersionContentVOList = Lists.newArrayList(tcpSchCollectorVersionContentVO);
|
|
||||||
|
|
||||||
CommMsgDTO commMsgDTO = CommMsgDTO.builder()
|
|
||||||
.content(JSON.toJSON(tcpSchCollectorVersionContentVOList))
|
|
||||||
.messageType(MsgConstants.UPDATE_COLLECTOR_FILE)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
iCommMsgService.clientsCommand(commMsgDTO);
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,107 +0,0 @@
|
|||||||
package com.docus.server.common.test;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class DispatchService {
|
|
||||||
|
|
||||||
public void dispatch() {
|
|
||||||
|
|
||||||
|
|
||||||
//获取所有空闲的终端
|
|
||||||
List<Terminal> terminalList = new ArrayList<>();
|
|
||||||
List<TaskInfo> taskInfos = this.getTaskInfos(terminalList.size());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//只采集,有优先级的
|
|
||||||
for (Terminal terminal : terminalList) {
|
|
||||||
for (TaskInfo taskInfo : taskInfos) {
|
|
||||||
//先找出有只采集的任务。
|
|
||||||
if (terminal.getOnlyTags().contains(taskInfo.getCollectType())) {
|
|
||||||
//把这个任务派给这个终端,并且把这个终端设置成繁忙
|
|
||||||
if (terminal.getPriorityTags().contains(taskInfo.getCollectType())) {
|
|
||||||
//把这个任务派给这个终端
|
|
||||||
terminal.setState(1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//只采集没有优先级
|
|
||||||
for (Terminal terminal : terminalList) {
|
|
||||||
//把刚才已经分配任务过的采集器排除
|
|
||||||
if (terminal.getState() == 1) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (TaskInfo taskInfo : taskInfos) {
|
|
||||||
//先找出有只采集的任务。
|
|
||||||
if (terminal.getOnlyTags().contains(taskInfo.getCollectType())) {
|
|
||||||
//把这个任务派给这个终端,并且把这个终端设置成繁忙
|
|
||||||
|
|
||||||
terminal.setState(1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//无只采集,有优先级
|
|
||||||
for (Terminal terminal : terminalList) {
|
|
||||||
|
|
||||||
//把刚才已经分配任务过的采集器排除
|
|
||||||
if (terminal.getState() == 1) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (TaskInfo taskInfo : taskInfos) {
|
|
||||||
//先找出有只采集的任务。
|
|
||||||
if (terminal.getPriorityTags().contains(taskInfo.getCollectType())) {
|
|
||||||
//把这个任务派给这个终端
|
|
||||||
terminal.setState(1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//无只采集,无优先级
|
|
||||||
for (Terminal terminal : terminalList) {
|
|
||||||
|
|
||||||
//把刚才已经分配任务过的采集器排除
|
|
||||||
if (terminal.getState() == 1) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (TaskInfo taskInfo : taskInfos) {
|
|
||||||
//先找出有只采集的任务。
|
|
||||||
//把这个任务派给这个终端
|
|
||||||
terminal.setState(1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void dispatchTask(List<TaskInfo> taskInfos, Terminal terminal) {
|
|
||||||
for (TaskInfo taskInfo : taskInfos) {
|
|
||||||
//先找出有只采集的任务。
|
|
||||||
if (terminal.getOnlyTags().contains(taskInfo.getCollectType())) {
|
|
||||||
//把这个任务派给这个终端
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (terminal.getPriorityTags().contains(taskInfo.getCollectType())) {
|
|
||||||
//把这个任务派给这个终端
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<TaskInfo> getTaskInfos(int size) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
package com.docus.server.common.test;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class TaskInfo {
|
|
||||||
|
|
||||||
private Long taskId;
|
|
||||||
|
|
||||||
private String collectType;
|
|
||||||
|
|
||||||
private String info;
|
|
||||||
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
package com.docus.server.common.test;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class Terminal {
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String collectType;
|
|
||||||
private List<String> priorityTags;
|
|
||||||
private List<String> onlyTags;
|
|
||||||
private Integer state;
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,313 @@
|
|||||||
|
package com.docus.server.common.utils;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import oshi.SystemInfo;
|
||||||
|
import oshi.hardware.CentralProcessor;
|
||||||
|
import oshi.hardware.GlobalMemory;
|
||||||
|
import oshi.hardware.HardwareAbstractionLayer;
|
||||||
|
import oshi.hardware.NetworkIF;
|
||||||
|
import oshi.software.os.FileSystem;
|
||||||
|
import oshi.software.os.OSFileStore;
|
||||||
|
import oshi.software.os.OperatingSystem;
|
||||||
|
import oshi.util.Util;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.Formatter;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统消息工具类
|
||||||
|
**/
|
||||||
|
public class SystemInfoUtils {
|
||||||
|
|
||||||
|
private static final int OSHI_WAIT_SECOND = 1000;
|
||||||
|
private static final int SLEEP_TIME = 2 * 1000;
|
||||||
|
private static SystemInfo systemInfo = new SystemInfo();
|
||||||
|
private static HardwareAbstractionLayer hardware = systemInfo.getHardware();
|
||||||
|
private static OperatingSystem operatingSystem = systemInfo.getOperatingSystem();
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
JSONObject info = getInfo();
|
||||||
|
System.out.println(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static JSONObject getCpuInfo() {
|
||||||
|
JSONObject cpuInfo = new JSONObject();
|
||||||
|
CentralProcessor processor = hardware.getProcessor();
|
||||||
|
// CPU信息
|
||||||
|
long[] prevTicks = processor.getSystemCpuLoadTicks();
|
||||||
|
Util.sleep(OSHI_WAIT_SECOND);
|
||||||
|
long[] ticks = processor.getSystemCpuLoadTicks();
|
||||||
|
long nice = ticks[CentralProcessor.TickType.NICE.getIndex()] - prevTicks[CentralProcessor.TickType.NICE.getIndex()];
|
||||||
|
long irq = ticks[CentralProcessor.TickType.IRQ.getIndex()] - prevTicks[CentralProcessor.TickType.IRQ.getIndex()];
|
||||||
|
long softirq = ticks[CentralProcessor.TickType.SOFTIRQ.getIndex()] - prevTicks[CentralProcessor.TickType.SOFTIRQ.getIndex()];
|
||||||
|
long steal = ticks[CentralProcessor.TickType.STEAL.getIndex()] - prevTicks[CentralProcessor.TickType.STEAL.getIndex()];
|
||||||
|
long cSys = ticks[CentralProcessor.TickType.SYSTEM.getIndex()] - prevTicks[CentralProcessor.TickType.SYSTEM.getIndex()];
|
||||||
|
long user = ticks[CentralProcessor.TickType.USER.getIndex()] - prevTicks[CentralProcessor.TickType.USER.getIndex()];
|
||||||
|
long iowait = ticks[CentralProcessor.TickType.IOWAIT.getIndex()] - prevTicks[CentralProcessor.TickType.IOWAIT.getIndex()];
|
||||||
|
long idle = ticks[CentralProcessor.TickType.IDLE.getIndex()] - prevTicks[CentralProcessor.TickType.IDLE.getIndex()];
|
||||||
|
long totalCpu = user + nice + cSys + idle + iowait + irq + softirq + steal;
|
||||||
|
//cpu核数
|
||||||
|
cpuInfo.put("cpuNum", processor.getLogicalProcessorCount());
|
||||||
|
//cpu系统使用率
|
||||||
|
cpuInfo.put("cSys", new DecimalFormat("#.##%").format(cSys * 1.0 / totalCpu));
|
||||||
|
//cpu用户使用率
|
||||||
|
cpuInfo.put("user", new DecimalFormat("#.##%").format(user * 1.0 / totalCpu));
|
||||||
|
//cpu当前等待率
|
||||||
|
cpuInfo.put("iowait", new DecimalFormat("#.##%").format(iowait * 1.0 / totalCpu));
|
||||||
|
//cpu当前使用率
|
||||||
|
cpuInfo.put("idle", new DecimalFormat("#.##%").format(1.0 - (idle * 1.0 / totalCpu)));
|
||||||
|
return cpuInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统jvm信息
|
||||||
|
*/
|
||||||
|
public static JSONObject getJvmInfo() {
|
||||||
|
JSONObject cpuInfo = new JSONObject();
|
||||||
|
Properties props = System.getProperties();
|
||||||
|
Runtime runtime = Runtime.getRuntime();
|
||||||
|
long jvmTotalMemoryByte = runtime.totalMemory();
|
||||||
|
long freeMemoryByte = runtime.freeMemory();
|
||||||
|
//jvm总内存
|
||||||
|
cpuInfo.put("total", formatByte(runtime.totalMemory()));
|
||||||
|
//空闲空间
|
||||||
|
cpuInfo.put("free", formatByte(runtime.freeMemory()));
|
||||||
|
//jvm最大可申请
|
||||||
|
cpuInfo.put("max", formatByte(runtime.maxMemory()));
|
||||||
|
//vm已使用内存
|
||||||
|
cpuInfo.put("user", formatByte(jvmTotalMemoryByte - freeMemoryByte));
|
||||||
|
//jvm内存使用率
|
||||||
|
cpuInfo.put("usageRate", new DecimalFormat("#.##%").format((jvmTotalMemoryByte - freeMemoryByte) * 1.0 / jvmTotalMemoryByte));
|
||||||
|
//jdk版本
|
||||||
|
cpuInfo.put("jdkVersion", props.getProperty("java.version"));
|
||||||
|
//jdk路径
|
||||||
|
cpuInfo.put("jdkHome", props.getProperty("java.home"));
|
||||||
|
return cpuInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统内存信息
|
||||||
|
*/
|
||||||
|
public static JSONObject getMemInfo() {
|
||||||
|
JSONObject cpuInfo = new JSONObject();
|
||||||
|
GlobalMemory memory = systemInfo.getHardware().getMemory();
|
||||||
|
//总内存
|
||||||
|
long totalByte = memory.getTotal();
|
||||||
|
//剩余
|
||||||
|
long acaliableByte = memory.getAvailable();
|
||||||
|
//总内存
|
||||||
|
cpuInfo.put("total", formatByte(totalByte));
|
||||||
|
//使用
|
||||||
|
cpuInfo.put("used", formatByte(totalByte - acaliableByte));
|
||||||
|
//剩余内存
|
||||||
|
cpuInfo.put("free", formatByte(acaliableByte));
|
||||||
|
//使用率
|
||||||
|
cpuInfo.put("usageRate", new DecimalFormat("#.##%").format((totalByte - acaliableByte) * 1.0 / totalByte));
|
||||||
|
return cpuInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 带宽
|
||||||
|
*/
|
||||||
|
public static JSONArray networkIFs() throws Exception {
|
||||||
|
JSONObject cpuInfo;
|
||||||
|
JSONArray sysFiles = new JSONArray();
|
||||||
|
|
||||||
|
List<NetworkIF> networkIFs = systemInfo.getHardware().getNetworkIFs();
|
||||||
|
for (NetworkIF networkIF : networkIFs) {
|
||||||
|
String name = networkIF.getName();
|
||||||
|
long receiveBytes = networkIF.getBytesRecv();
|
||||||
|
long transmitBytes = networkIF.getBytesSent();
|
||||||
|
|
||||||
|
cpuInfo = new JSONObject();
|
||||||
|
//名称
|
||||||
|
cpuInfo.put("name", name);
|
||||||
|
//网络接收
|
||||||
|
cpuInfo.put("receiveBytes", formatNumber(receiveBytes / (1024.0 * (2 * 1000 / 1000))));
|
||||||
|
//网络发送
|
||||||
|
cpuInfo.put("transmitBytes", formatNumber(transmitBytes / (1024.0 * (2 * 1000 / 1000))));
|
||||||
|
|
||||||
|
sysFiles.add(cpuInfo);
|
||||||
|
}
|
||||||
|
return sysFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static JSONObject getNetWork() {
|
||||||
|
JSONObject networkInfo = new JSONObject();
|
||||||
|
Properties props = System.getProperties();
|
||||||
|
String os = props.getProperty("os.name").toLowerCase();
|
||||||
|
os = os.startsWith("win") ? "windows" : "linux";
|
||||||
|
Map<String, String> result = new HashMap<>();
|
||||||
|
Process pro = null;
|
||||||
|
Runtime r = Runtime.getRuntime();
|
||||||
|
BufferedReader input = null;
|
||||||
|
try {
|
||||||
|
String command = "windows".equals(os) ? "netstat -e" : "ifconfig";
|
||||||
|
pro = r.exec(command);
|
||||||
|
input = new BufferedReader(new InputStreamReader(pro.getInputStream()));
|
||||||
|
long result1[] = readInLine(input, os);
|
||||||
|
Thread.sleep(SLEEP_TIME);
|
||||||
|
pro.destroy();
|
||||||
|
input.close();
|
||||||
|
pro = r.exec(command);
|
||||||
|
input = new BufferedReader(new InputStreamReader(pro.getInputStream()));
|
||||||
|
long result2[] = readInLine(input, os);
|
||||||
|
String rxPercent = formatNumber((result2[0] - result1[0]) / (1024.0 * (SLEEP_TIME / 1000)));// 下行速率(kB/s)
|
||||||
|
String txPercent = formatNumber((result2[1] - result1[1]) / (1024.0 * (SLEEP_TIME / 1000)));// 上行速率(kB/s)
|
||||||
|
networkInfo.put("rxPercent", rxPercent);
|
||||||
|
networkInfo.put("txPercent", txPercent);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (input != null) {
|
||||||
|
try {
|
||||||
|
input.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Optional.ofNullable(pro).ifPresent(p -> p.destroy());
|
||||||
|
}
|
||||||
|
return networkInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static long[] readInLine(BufferedReader input, String osType) {
|
||||||
|
long arr[] = new long[2];
|
||||||
|
StringTokenizer tokenStat = null;
|
||||||
|
try {
|
||||||
|
if (osType.equals("linux")) { // 获取linux环境下的网口上下行速率
|
||||||
|
long rx = 0, tx = 0;
|
||||||
|
String line = null;
|
||||||
|
//RX packets:4171603 errors:0 dropped:0 overruns:0 frame:0
|
||||||
|
//TX packets:4171603 errors:0 dropped:0 overruns:0 carrier:0
|
||||||
|
while ((line = input.readLine()) != null) {
|
||||||
|
if (line.indexOf("RX packets") >= 0) {
|
||||||
|
rx += Long.parseLong(line.substring(line.indexOf("RX packets") + 11, line.indexOf(" ", line.indexOf("RX packets") + 11)));
|
||||||
|
} else if (line.indexOf("TX packets") >= 0) {
|
||||||
|
tx += Long.parseLong(line.substring(line.indexOf("TX packets") + 11, line.indexOf(" ", line.indexOf("TX packets") + 11)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr[0] = rx;
|
||||||
|
arr[1] = tx;
|
||||||
|
} else { // 获取windows环境下的网口上下行速率
|
||||||
|
input.readLine();
|
||||||
|
input.readLine();
|
||||||
|
input.readLine();
|
||||||
|
input.readLine();
|
||||||
|
tokenStat = new StringTokenizer(input.readLine());
|
||||||
|
tokenStat.nextToken();
|
||||||
|
arr[0] = Long.parseLong(tokenStat.nextToken());
|
||||||
|
arr[1] = Long.parseLong(tokenStat.nextToken());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static String formatNumber(double f) {
|
||||||
|
return new Formatter().format("%.2f", f).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统盘符信息
|
||||||
|
*/
|
||||||
|
public static JSONArray getSysFileInfo() {
|
||||||
|
JSONObject cpuInfo;
|
||||||
|
JSONArray sysFiles = new JSONArray();
|
||||||
|
FileSystem fileSystem = operatingSystem.getFileSystem();
|
||||||
|
List<OSFileStore> fsArray = fileSystem.getFileStores();
|
||||||
|
for (OSFileStore fs : fsArray) {
|
||||||
|
cpuInfo = new JSONObject();
|
||||||
|
//盘符路径
|
||||||
|
cpuInfo.put("dirName", fs.getMount());
|
||||||
|
//盘符类型
|
||||||
|
cpuInfo.put("sysTypeName", fs.getType());
|
||||||
|
//文件类型
|
||||||
|
cpuInfo.put("typeName", fs.getName());
|
||||||
|
//总大小
|
||||||
|
cpuInfo.put("total", formatByte(fs.getTotalSpace()));
|
||||||
|
//剩余大小
|
||||||
|
cpuInfo.put("free", formatByte(fs.getUsableSpace()));
|
||||||
|
//已经使用量
|
||||||
|
cpuInfo.put("used", formatByte(fs.getTotalSpace() - fs.getUsableSpace()));
|
||||||
|
if (fs.getTotalSpace() == 0) {
|
||||||
|
//资源的使用率
|
||||||
|
cpuInfo.put("usage", 0);
|
||||||
|
} else {
|
||||||
|
cpuInfo.put("usage", new DecimalFormat("#.##%").format((fs.getTotalSpace() - fs.getUsableSpace()) * 1.0 / fs.getTotalSpace()));
|
||||||
|
}
|
||||||
|
sysFiles.add(cpuInfo);
|
||||||
|
}
|
||||||
|
return sysFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统信息
|
||||||
|
*/
|
||||||
|
public static JSONObject getSysInfo() throws UnknownHostException {
|
||||||
|
JSONObject cpuInfo = new JSONObject();
|
||||||
|
Properties props = System.getProperties();
|
||||||
|
//操作系统名
|
||||||
|
cpuInfo.put("osName", props.getProperty("os.name"));
|
||||||
|
//系统架构
|
||||||
|
cpuInfo.put("osArch", props.getProperty("os.arch"));
|
||||||
|
//服务器名称
|
||||||
|
cpuInfo.put("computerName", InetAddress.getLocalHost().getHostName());
|
||||||
|
//服务器Ip
|
||||||
|
cpuInfo.put("computerIp", InetAddress.getLocalHost().getHostAddress());
|
||||||
|
//项目路径
|
||||||
|
cpuInfo.put("userDir", props.getProperty("user.dir"));
|
||||||
|
return cpuInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有系统信息
|
||||||
|
*/
|
||||||
|
public static JSONObject getInfo() throws Exception {
|
||||||
|
JSONObject info = new JSONObject();
|
||||||
|
info.put("cpuInfo", getCpuInfo());
|
||||||
|
info.put("jvmInfo", getJvmInfo());
|
||||||
|
info.put("memInfo", getMemInfo());
|
||||||
|
info.put("sysInfo", getSysInfo());
|
||||||
|
info.put("sysFileInfo", getSysFileInfo());
|
||||||
|
info.put("networkInfo", getNetWork());
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位转换
|
||||||
|
*/
|
||||||
|
private static String formatByte(long byteNumber) {
|
||||||
|
//换算单位
|
||||||
|
double FORMAT = 1024.0;
|
||||||
|
double kbNumber = byteNumber / FORMAT;
|
||||||
|
if (kbNumber < FORMAT) {
|
||||||
|
return new DecimalFormat("#.##KB").format(kbNumber);
|
||||||
|
}
|
||||||
|
double mbNumber = kbNumber / FORMAT;
|
||||||
|
if (mbNumber < FORMAT) {
|
||||||
|
return new DecimalFormat("#.##MB").format(mbNumber);
|
||||||
|
}
|
||||||
|
double gbNumber = mbNumber / FORMAT;
|
||||||
|
if (gbNumber < FORMAT) {
|
||||||
|
return new DecimalFormat("#.##GB").format(gbNumber);
|
||||||
|
}
|
||||||
|
double tbNumber = gbNumber / FORMAT;
|
||||||
|
return new DecimalFormat("#.##TB").format(tbNumber);
|
||||||
|
}
|
||||||
|
}
|
@ -1,25 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.server.api.scheduling.management.CommMsgApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.CommMsgDTO;
|
|
||||||
import com.docus.server.service.ICommMsgService;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用消息体 TCP API
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class CommMsgController implements CommMsgApi {
|
|
||||||
@Resource
|
|
||||||
private ICommMsgService iCommMsgService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void clientCommand(CommMsgDTO commMsgDTO) {
|
|
||||||
iCommMsgService.clientCommand(commMsgDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.server.api.scheduling.management.FileApi;
|
|
||||||
import com.docus.server.service.IFileUploadService;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传下载 API
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class FileController implements FileApi {
|
|
||||||
@Resource
|
|
||||||
private IFileUploadService iFileUploadService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void downloadFile(String filePath, HttpServletResponse response) throws Exception {
|
|
||||||
iFileUploadService.downloadFile(filePath, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void uploadFile(MultipartFile[] multipartFiles, String pathKey) throws Exception {
|
|
||||||
iFileUploadService.uploadFile(multipartFiles, pathKey);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectErrorLogApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.AddSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.DeleteSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.EditSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.service.ISchCollectErrorLogService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollecterrorlog.SchCollectErrorLogVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器异常日志 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchCollectErrorLogController implements SchCollectErrorLogApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectErrorLogService iSchCollectErrorLogService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectErrorLogVO findById(String id) {
|
|
||||||
return iSchCollectErrorLogService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectErrorLogVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectErrorLogService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectErrorLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchCollectErrorLogDTO addSchCollectErrorLogDTO, MultipartFile[] multipartFiles) throws Exception {
|
|
||||||
return iSchCollectErrorLogService.add(addSchCollectErrorLogDTO, multipartFiles);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectErrorLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectErrorLogDTO editSchCollectErrorLogDTO) {
|
|
||||||
return iSchCollectErrorLogService.edit(editSchCollectErrorLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectErrorLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectErrorLogDTO deleteSchCollectErrorLogDTO) {
|
|
||||||
return iSchCollectErrorLogService.delete(deleteSchCollectErrorLogDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,103 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.core.util.ParamsUtils;
|
|
||||||
import com.docus.core.util.json.JSON;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.log.annotation.TrackGroup;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectRecordApi;
|
|
||||||
import com.docus.server.common.SchCollectorTask;
|
|
||||||
import com.docus.server.common.process.ChannelProcessor;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.task.ReportDownTwoDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.AddSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.DeleteSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.EditSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.RetrySchCollectRecordDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecord;
|
|
||||||
import com.docus.server.enums.RetryTaskEnum;
|
|
||||||
import com.docus.server.service.ISchCollectRecordService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecord.SchCollectRecordVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchCollectRecordController implements SchCollectRecordApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectRecordService iSchCollectRecordService;
|
|
||||||
@Resource
|
|
||||||
private SchCollectorTask schedulerTask;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectRecordVO findById(String id) {
|
|
||||||
return iSchCollectRecordService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectRecordVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectRecordService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectRecordDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectRecord add(AddSchCollectRecordDTO addSchCollectRecordDTO) {
|
|
||||||
return iSchCollectRecordService.add(addSchCollectRecordDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectRecordDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@TrackGroup(group = "SchCollectRecordController-edit", processor = ChannelProcessor.class)
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectRecordDTO editSchCollectRecordDTO) {
|
|
||||||
return iSchCollectRecordService.edit(editSchCollectRecordDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectRecordDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectRecordDTO deleteSchCollectRecordDTO) {
|
|
||||||
return iSchCollectRecordService.delete(deleteSchCollectRecordDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void retryTask(RetrySchCollectRecordDTO retrySchCollectRecordDTO) {
|
|
||||||
ReportDownTwoDTO report = JSON.fromJSON(retrySchCollectRecordDTO.getTaskOriginJson(), ReportDownTwoDTO.class);
|
|
||||||
|
|
||||||
report.setParams(ParamsUtils
|
|
||||||
.addParam("collectRecordId", retrySchCollectRecordDTO.getId())
|
|
||||||
.addParam("isRetryTask", RetryTaskEnum.RETRY_TASK.getValue())
|
|
||||||
.param());
|
|
||||||
schedulerTask.addRetryTask(report);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectRecordRetryLogApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.AddSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.DeleteSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.EditSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecordRetryLog;
|
|
||||||
import com.docus.server.service.ISchCollectRecordRetryLogService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecordretrylog.SchCollectRecordRetryLogVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表重试表 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchCollectRecordRetryLogController implements SchCollectRecordRetryLogApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectRecordRetryLogService iSchCollectRecordRetryLogService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectRecordRetryLogVO findById(String id) {
|
|
||||||
return iSchCollectRecordRetryLogService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectRecordRetryLogVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectRecordRetryLogService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectRecordRetryLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectRecordRetryLog add(AddSchCollectRecordRetryLogDTO addSchCollectRecordRetryLogDTO) {
|
|
||||||
return iSchCollectRecordRetryLogService.add(addSchCollectRecordRetryLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectRecordRetryLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectRecordRetryLogDTO editSchCollectRecordRetryLogDTO) {
|
|
||||||
return iSchCollectRecordRetryLogService.edit(editSchCollectRecordRetryLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectRecordRetryLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectRecordRetryLogDTO deleteSchCollectRecordRetryLogDTO) {
|
|
||||||
return iSchCollectRecordRetryLogService.delete(deleteSchCollectRecordRetryLogDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,94 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.core.util.json.JSON;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectorConfigApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.AddSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.DeleteSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.EditSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.service.ISchCollectorConfigService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorconfig.SchCollectorConfigVO;
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器配置 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchCollectorConfigController implements SchCollectorConfigApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorConfigService iSchCollectorConfigService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectorConfigVO findById(String id) {
|
|
||||||
return iSchCollectorConfigService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectorConfigVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectorConfigService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorConfigDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchCollectorConfigDTO addSchCollectorConfigDTO) {
|
|
||||||
return iSchCollectorConfigService.add(addSchCollectorConfigDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorConfigDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectorConfigDTO editSchCollectorConfigDTO) {
|
|
||||||
return iSchCollectorConfigService.edit(editSchCollectorConfigDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorConfigDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectorConfigDTO deleteSchCollectorConfigDTO) {
|
|
||||||
return iSchCollectorConfigService.delete(deleteSchCollectorConfigDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
HashMap<Object, Object> objectObjectHashMap = Maps.newHashMap();
|
|
||||||
objectObjectHashMap.put("ocr.url", "http://192.168.2.13/ocr");
|
|
||||||
objectObjectHashMap.put("ocr.name", "lin");
|
|
||||||
objectObjectHashMap.put("ocr.pwd", "123");
|
|
||||||
System.out.println(JSON.toJSON(objectObjectHashMap));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,94 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.log.annotation.TrackLogGroup;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectorApi;
|
|
||||||
import com.docus.server.common.process.CollectorVersionProcessor;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.AddSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.DeleteSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.EditSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.UpdateSchCollectorDTO;
|
|
||||||
import com.docus.server.service.ISchCollectorService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollector.SchCollectorVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器管理 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchCollectorController implements SchCollectorApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorService iSchCollectorService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectorVO findById(String id) {
|
|
||||||
return iSchCollectorService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectorVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectorService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchCollectorDTO addSchCollectorDTO) {
|
|
||||||
return iSchCollectorService.add(addSchCollectorDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectorDTO editSchCollectorDTO) {
|
|
||||||
return iSchCollectorService.edit(editSchCollectorDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectorDTO deleteSchCollectorDTO) {
|
|
||||||
return iSchCollectorService.delete(deleteSchCollectorDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选为当前版本并更新
|
|
||||||
*
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@TrackLogGroup(group = "采集器管理", action = "更新", desc = "更新采集器版本", processor = CollectorVersionProcessor.class)
|
|
||||||
@Override
|
|
||||||
public boolean updateVersion(UpdateSchCollectorDTO updateDTO) {
|
|
||||||
return iSchCollectorService.updateVersion(updateDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectorVersionApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.AddSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.DeleteSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.EditSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.service.ISchCollectorService;
|
|
||||||
import com.docus.server.service.ISchCollectorVersionService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversion.SchCollectorVersionVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表管理 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchCollectorVersionController implements SchCollectorVersionApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorVersionService iSchCollectorVersionService;
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorService iSchCollectorService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectorVersionVO findById(String id) {
|
|
||||||
return iSchCollectorVersionService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectorVersionVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectorVersionService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorVersionDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchCollectorVersionDTO addSchCollectorVersionDTO) {
|
|
||||||
return iSchCollectorVersionService.add(addSchCollectorVersionDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorVersionDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectorVersionDTO editSchCollectorVersionDTO) {
|
|
||||||
return iSchCollectorVersionService.edit(editSchCollectorVersionDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorVersionDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectorVersionDTO deleteSchCollectorVersionDTO) {
|
|
||||||
return iSchCollectorVersionService.delete(deleteSchCollectorVersionDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,114 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.docus.core.util.Func;
|
|
||||||
import com.docus.infrastructure.web.exception.ApiException;
|
|
||||||
import com.docus.infrastructure.web.exception.ExceptionCode;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectorVersionFileApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.AddSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.DeleteSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.EditSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersion;
|
|
||||||
import com.docus.server.service.ISchCollectorVersionFileService;
|
|
||||||
import com.docus.server.service.ISchCollectorVersionService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversionfile.SchCollectorVersionFileVO;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表更新包管理 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@Slf4j
|
|
||||||
public class SchCollectorVersionFileController implements SchCollectorVersionFileApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorVersionFileService iSchCollectorVersionFileService;
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorVersionService iSchCollectorVersionService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectorVersionFileVO findById(String id) {
|
|
||||||
return iSchCollectorVersionFileService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectorVersionFileVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectorVersionFileService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchCollectorVersionFileDTO addDTO, MultipartFile[] multipartFiles) throws Exception {
|
|
||||||
if (fileValid(multipartFiles, addDTO)) {
|
|
||||||
throw new ApiException(ExceptionCode.ParamIllegal.getCode(), "请选择文件和填写上传文件信息!");
|
|
||||||
}
|
|
||||||
|
|
||||||
SchCollectorVersion schCollectorVersion = iSchCollectorVersionService.findByVersion(addDTO.getCollectorId(), addDTO.getCollectorVersionNo());
|
|
||||||
|
|
||||||
if (null != schCollectorVersion) {
|
|
||||||
throw new ApiException(ExceptionCode.ParamIllegal.getCode(), "当前采集器版本号已存在!");
|
|
||||||
}
|
|
||||||
|
|
||||||
iSchCollectorVersionFileService.addVersionAndFile(addDTO, multipartFiles);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean fileValid(MultipartFile[] multipartFiles, AddSchCollectorVersionFileDTO addSchCollectorVersionFileDTO) {
|
|
||||||
return multipartFiles == null
|
|
||||||
|| multipartFiles.length == 0
|
|
||||||
|| StrUtil.isBlank(addSchCollectorVersionFileDTO.getCollectorVersionNo())
|
|
||||||
|| Func.isEmpty(addSchCollectorVersionFileDTO.getCollectorId());
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean add(AddSchCollectorVersionFileDTO addSchCollectorVersionFileDTO) {
|
|
||||||
return iSchCollectorVersionFileService.add(addSchCollectorVersionFileDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorVersionFileDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectorVersionFileDTO editSchCollectorVersionFileDTO) {
|
|
||||||
return iSchCollectorVersionFileService.edit(editSchCollectorVersionFileDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorVersionFileDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectorVersionFileDTO deleteSchCollectorVersionFileDTO) {
|
|
||||||
return iSchCollectorVersionFileService.delete(deleteSchCollectorVersionFileDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchCollectorVersionLogApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.AddSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.DeleteSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.EditSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.service.ISchCollectorVersionLogService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversionlog.SchCollectorVersionLogVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本更新日志管理 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchCollectorVersionLogController implements SchCollectorVersionLogApi {
|
|
||||||
@Resource
|
|
||||||
private ISchCollectorVersionLogService iSchCollectorVersionLogService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchCollectorVersionLogVO findById(String id) {
|
|
||||||
return iSchCollectorVersionLogService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchCollectorVersionLogVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchCollectorVersionLogService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorVersionLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchCollectorVersionLogDTO addSchCollectorVersionLogDTO) {
|
|
||||||
return iSchCollectorVersionLogService.add(addSchCollectorVersionLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorVersionLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchCollectorVersionLogDTO editSchCollectorVersionLogDTO) {
|
|
||||||
return iSchCollectorVersionLogService.edit(editSchCollectorVersionLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorVersionLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchCollectorVersionLogDTO deleteSchCollectorVersionLogDTO) {
|
|
||||||
return iSchCollectorVersionLogService.delete(deleteSchCollectorVersionLogDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchOperationLogApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.AddSchOperationLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.DeleteSchOperationLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.EditSchOperationLogDTO;
|
|
||||||
import com.docus.server.service.ISchOperationLogService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schoperationlog.SchOperationLogVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集调度器操作日志 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchOperationLogController implements SchOperationLogApi {
|
|
||||||
@Resource
|
|
||||||
private ISchOperationLogService iSchOperationLogService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchOperationLogVO findById(String id) {
|
|
||||||
return iSchOperationLogService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchOperationLogVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchOperationLogService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchOperationLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchOperationLogDTO addSchOperationLogDTO) {
|
|
||||||
return iSchOperationLogService.add(addSchOperationLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchOperationLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchOperationLogDTO editSchOperationLogDTO) {
|
|
||||||
return iSchOperationLogService.edit(editSchOperationLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchOperationLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchOperationLogDTO deleteSchOperationLogDTO) {
|
|
||||||
return iSchOperationLogService.delete(deleteSchOperationLogDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchSystemParamsApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.AddSchSystemParamsDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.DeleteSchSystemParamsDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.EditSchSystemParamsDTO;
|
|
||||||
import com.docus.server.service.ISchSystemParamsService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schsystemparams.SchSystemParamsVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统参数表 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchSystemParamsController implements SchSystemParamsApi {
|
|
||||||
@Resource
|
|
||||||
private ISchSystemParamsService iSchSystemParamsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchSystemParamsVO findById(String id) {
|
|
||||||
return iSchSystemParamsService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchSystemParamsVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchSystemParamsService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchSystemParamsDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchSystemParamsDTO addSchSystemParamsDTO) {
|
|
||||||
return iSchSystemParamsService.add(addSchSystemParamsDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchSystemParamsDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchSystemParamsDTO editSchSystemParamsDTO) {
|
|
||||||
return iSchSystemParamsService.edit(editSchSystemParamsDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchSystemParamsDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchSystemParamsDTO deleteSchSystemParamsDTO) {
|
|
||||||
return iSchSystemParamsService.delete(deleteSchSystemParamsDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,87 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.log.annotation.TrackGroup;
|
|
||||||
import com.docus.server.api.scheduling.management.SchTerminatorApi;
|
|
||||||
import com.docus.server.common.netty.server.ChannelRepository;
|
|
||||||
import com.docus.server.common.process.ChannelProcessor;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.AddSchTerminatorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.DeleteSchTerminatorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.EditSchTerminatorDTO;
|
|
||||||
import com.docus.server.service.ISchTerminatorService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schterminator.SchTerminatorVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 执行管理器 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchTerminatorController implements SchTerminatorApi {
|
|
||||||
@Resource
|
|
||||||
private ISchTerminatorService iSchTerminatorService;
|
|
||||||
@Resource
|
|
||||||
private ChannelRepository channelRepository;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchTerminatorVO findById(String id) {
|
|
||||||
return iSchTerminatorService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchTerminatorVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchTerminatorService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchTerminatorDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchTerminatorDTO addSchTerminatorDTO) {
|
|
||||||
return iSchTerminatorService.add(addSchTerminatorDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchTerminatorDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@TrackGroup(group = "SchTerminatorController", processor = ChannelProcessor.class)
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchTerminatorDTO editSchTerminatorDTO) {
|
|
||||||
return iSchTerminatorService.edit(editSchTerminatorDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchTerminatorDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchTerminatorDTO deleteSchTerminatorDTO) {
|
|
||||||
return iSchTerminatorService.delete(deleteSchTerminatorDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
package com.docus.server.controller;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.api.scheduling.management.SchVirtualLogApi;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.AddSchVirtualLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.DeleteSchVirtualLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.EditSchVirtualLogDTO;
|
|
||||||
import com.docus.server.service.ISchVirtualLogService;
|
|
||||||
import com.docus.server.vo.scheduling.management.schvirtuallog.SchVirtualLogVO;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 虚拟机使用情况 控制器类
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SchVirtualLogController implements SchVirtualLogApi {
|
|
||||||
@Resource
|
|
||||||
private ISchVirtualLogService iSchVirtualLogService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键Id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public SchVirtualLogVO findById(String id) {
|
|
||||||
return iSchVirtualLogService.findById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<SchVirtualLogVO> search(SearchDTO searchDTO) {
|
|
||||||
return iSchVirtualLogService.search(searchDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchVirtualLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean add(AddSchVirtualLogDTO addSchVirtualLogDTO) {
|
|
||||||
return iSchVirtualLogService.add(addSchVirtualLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchVirtualLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean edit(EditSchVirtualLogDTO editSchVirtualLogDTO) {
|
|
||||||
return iSchVirtualLogService.edit(editSchVirtualLogDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchVirtualLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int delete(DeleteSchVirtualLogDTO deleteSchVirtualLogDTO) {
|
|
||||||
return iSchVirtualLogService.delete(deleteSchVirtualLogDTO);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.server.common.netty.CommMsg;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.CommMsgDTO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用消息转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface CommMsgConvert {
|
|
||||||
|
|
||||||
CommMsgConvert INSTANCE = Mappers.getMapper(CommMsgConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
CommMsg convertDO(CommMsgDTO commMsgDTO);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectErrorLog;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.AddSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.EditSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.DeleteSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollecterrorlog.SchCollectErrorLogVO;
|
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器异常日志 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectErrorLogConvert {
|
|
||||||
|
|
||||||
SchCollectErrorLogConvert INSTANCE = Mappers.getMapper(SchCollectErrorLogConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectErrorLog convertDO(AddSchCollectErrorLogDTO addSchCollectErrorLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectErrorLog convertDO(EditSchCollectErrorLogDTO editSchCollectErrorLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectErrorLog> convertAddDOList(List<AddSchCollectErrorLogDTO> addSchCollectErrorLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectErrorLog> convertEditDOList(List<EditSchCollectErrorLogDTO> editSchCollectErrorLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectErrorLogVO convertVO(SchCollectErrorLog schCollectErrorLog);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectErrorLogVO> convertVO(List<SchCollectErrorLog> schCollectErrorLogList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectErrorLogVO> convertVO(PageResult<SchCollectErrorLog> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.AddSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.EditSchCollectRecordDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecord;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecord.SchCollectRecordVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectRecordConvert {
|
|
||||||
|
|
||||||
SchCollectRecordConvert INSTANCE = Mappers.getMapper(SchCollectRecordConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectRecord convertDO(AddSchCollectRecordDTO addSchCollectRecordDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectRecord convertDO(EditSchCollectRecordDTO editSchCollectRecordDTO, @MappingTarget SchCollectRecord schCollectRecord);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectRecord> convertAddDOList(List<AddSchCollectRecordDTO> addSchCollectRecordDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectRecord> convertEditDOList(List<EditSchCollectRecordDTO> editSchCollectRecordDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectRecordVO convertVO(SchCollectRecord schCollectRecord);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectRecordVO> convertVO(List<SchCollectRecord> schCollectRecordList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectRecordVO> convertVO(PageResult<SchCollectRecord> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.EditSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.AddSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.EditSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecordRetryLog;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecordretrylog.SchCollectRecordRetryLogVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表重试表 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectRecordRetryLogConvert {
|
|
||||||
|
|
||||||
SchCollectRecordRetryLogConvert INSTANCE = Mappers.getMapper(SchCollectRecordRetryLogConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectRecordRetryLog convertDO(EditSchCollectRecordDTO editSchCollectRecordDTO, @MappingTarget SchCollectRecordRetryLog schCollectRecordRetryLog);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectRecordRetryLog convertDO(AddSchCollectRecordRetryLogDTO addSchCollectRecordRetryLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectRecordRetryLog convertDO(EditSchCollectRecordRetryLogDTO editSchCollectRecordRetryLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectRecordRetryLog> convertAddDOList(List<AddSchCollectRecordRetryLogDTO> addSchCollectRecordRetryLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectRecordRetryLog> convertEditDOList(List<EditSchCollectRecordRetryLogDTO> editSchCollectRecordRetryLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectRecordRetryLogVO convertVO(SchCollectRecordRetryLog schCollectRecordRetryLog);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectRecordRetryLogVO> convertVO(List<SchCollectRecordRetryLog> schCollectRecordRetryLogList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectRecordRetryLogVO> convertVO(PageResult<SchCollectRecordRetryLog> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.AddSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.EditSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorConfig;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorconfig.SchCollectorConfigVO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorconfig.TcpSchCollectorConfigVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器配置 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorConfigConvert {
|
|
||||||
|
|
||||||
SchCollectorConfigConvert INSTANCE = Mappers.getMapper(SchCollectorConfigConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorConfig convertDO(AddSchCollectorConfigDTO addSchCollectorConfigDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorConfig convertDO(EditSchCollectorConfigDTO editSchCollectorConfigDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorConfigVO convertVO(SchCollectorConfig schCollectorConfig);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectorConfigVO> convertVO(PageResult<SchCollectorConfig> pageResult);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<TcpSchCollectorConfigVO> convertTcpVOList(List<SchCollectorConfig> publicConfig);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
TcpSchCollectorConfigVO convertTcpVO(SchCollectorConfig schCollectorConfig);
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.AddSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.EditSchCollectorDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollector;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollector.SchCollectorVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器管理 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorConvert {
|
|
||||||
|
|
||||||
SchCollectorConvert INSTANCE = Mappers.getMapper(SchCollectorConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollector convertDO(AddSchCollectorDTO addSchCollectorDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollector convertDO(EditSchCollectorDTO editSchCollectorDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollector> convertAddDOList(List<AddSchCollectorDTO> addSchCollectorDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollector> convertEditDOList(List<EditSchCollectorDTO> editSchCollectorDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVO convertVO(SchCollector schCollector);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVO> convertVO(List<SchCollector> schCollectorList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectorVO> convertVO(PageResult<SchCollector> pageResult);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.AddSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.EditSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersion;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversion.SchCollectorVersionVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表管理 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorVersionConvert {
|
|
||||||
|
|
||||||
SchCollectorVersionConvert INSTANCE = Mappers.getMapper(SchCollectorVersionConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersion convertDO(AddSchCollectorVersionDTO addSchCollectorVersionDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersion convertDO(EditSchCollectorVersionDTO editSchCollectorVersionDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersion> convertAddDOList(List<AddSchCollectorVersionDTO> addSchCollectorVersionDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersion> convertEditDOList(List<EditSchCollectorVersionDTO> editSchCollectorVersionDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersionVO convertVO(SchCollectorVersion schCollectorVersion);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersionVO> convertVO(List<SchCollectorVersion> schCollectorVersionList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectorVersionVO> convertVO(PageResult<SchCollectorVersion> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionFile;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.AddSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.EditSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.DeleteSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversionfile.SchCollectorVersionFileVO;
|
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表更新包管理 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorVersionFileConvert {
|
|
||||||
|
|
||||||
SchCollectorVersionFileConvert INSTANCE = Mappers.getMapper(SchCollectorVersionFileConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersionFile convertDO(AddSchCollectorVersionFileDTO addSchCollectorVersionFileDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersionFile convertDO(EditSchCollectorVersionFileDTO editSchCollectorVersionFileDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersionFile> convertAddDOList(List<AddSchCollectorVersionFileDTO> addSchCollectorVersionFileDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersionFile> convertEditDOList(List<EditSchCollectorVersionFileDTO> editSchCollectorVersionFileDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersionFileVO convertVO(SchCollectorVersionFile schCollectorVersionFile);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersionFileVO> convertVO(List<SchCollectorVersionFile> schCollectorVersionFileList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectorVersionFileVO> convertVO(PageResult<SchCollectorVersionFile> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionLog;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.AddSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.EditSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.DeleteSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversionlog.SchCollectorVersionLogVO;
|
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本更新日志管理 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorVersionLogConvert {
|
|
||||||
|
|
||||||
SchCollectorVersionLogConvert INSTANCE = Mappers.getMapper(SchCollectorVersionLogConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersionLog convertDO(AddSchCollectorVersionLogDTO addSchCollectorVersionLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersionLog convertDO(EditSchCollectorVersionLogDTO editSchCollectorVersionLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersionLog> convertAddDOList(List<AddSchCollectorVersionLogDTO> addSchCollectorVersionLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersionLog> convertEditDOList(List<EditSchCollectorVersionLogDTO> editSchCollectorVersionLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchCollectorVersionLogVO convertVO(SchCollectorVersionLog schCollectorVersionLog);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchCollectorVersionLogVO> convertVO(List<SchCollectorVersionLog> schCollectorVersionLogList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchCollectorVersionLogVO> convertVO(PageResult<SchCollectorVersionLog> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchOperationLog;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.AddSchOperationLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.EditSchOperationLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.DeleteSchOperationLogDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schoperationlog.SchOperationLogVO;
|
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集调度器操作日志 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchOperationLogConvert {
|
|
||||||
|
|
||||||
SchOperationLogConvert INSTANCE = Mappers.getMapper(SchOperationLogConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchOperationLog convertDO(AddSchOperationLogDTO addSchOperationLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchOperationLog convertDO(EditSchOperationLogDTO editSchOperationLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchOperationLog> convertAddDOList(List<AddSchOperationLogDTO> addSchOperationLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchOperationLog> convertEditDOList(List<EditSchOperationLogDTO> editSchOperationLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchOperationLogVO convertVO(SchOperationLog schOperationLog);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchOperationLogVO> convertVO(List<SchOperationLog> schOperationLogList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchOperationLogVO> convertVO(PageResult<SchOperationLog> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchSystemParams;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.AddSchSystemParamsDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.EditSchSystemParamsDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.DeleteSchSystemParamsDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schsystemparams.SchSystemParamsVO;
|
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统参数表 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchSystemParamsConvert {
|
|
||||||
|
|
||||||
SchSystemParamsConvert INSTANCE = Mappers.getMapper(SchSystemParamsConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchSystemParams convertDO(AddSchSystemParamsDTO addSchSystemParamsDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchSystemParams convertDO(EditSchSystemParamsDTO editSchSystemParamsDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchSystemParams> convertAddDOList(List<AddSchSystemParamsDTO> addSchSystemParamsDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchSystemParams> convertEditDOList(List<EditSchSystemParamsDTO> editSchSystemParamsDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchSystemParamsVO convertVO(SchSystemParams schSystemParams);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchSystemParamsVO> convertVO(List<SchSystemParams> schSystemParamsList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchSystemParamsVO> convertVO(PageResult<SchSystemParams> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.AddSchTerminatorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.EditSchTerminatorDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchTerminator;
|
|
||||||
import com.docus.server.vo.scheduling.management.schterminator.SchTerminatorVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.MappingTarget;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 执行管理器 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchTerminatorConvert {
|
|
||||||
|
|
||||||
SchTerminatorConvert INSTANCE = Mappers.getMapper(SchTerminatorConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchTerminator convertDO(AddSchTerminatorDTO addSchTerminatorDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchTerminator convertDO(EditSchTerminatorDTO editSchTerminatorDTO, @MappingTarget SchTerminator schTerminator1);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchTerminatorVO convertVO(SchTerminator schTerminator);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchTerminatorVO> convertVO(List<SchTerminator> schTerminatorList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchTerminatorVO> convertVO(PageResult<SchTerminator> pageResult);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
package com.docus.server.convert;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.AddSchVirtualLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.EditSchVirtualLogDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchVirtualLog;
|
|
||||||
import com.docus.server.vo.scheduling.management.schvirtuallog.SchVirtualLogVO;
|
|
||||||
import org.mapstruct.Mapper;
|
|
||||||
import org.mapstruct.Mappings;
|
|
||||||
import org.mapstruct.factory.Mappers;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 虚拟机使用情况 服务转换器
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchVirtualLogConvert {
|
|
||||||
|
|
||||||
SchVirtualLogConvert INSTANCE = Mappers.getMapper(SchVirtualLogConvert.class);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchVirtualLog convertDO(AddSchVirtualLogDTO addSchVirtualLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchVirtualLog convertDO(EditSchVirtualLogDTO editSchVirtualLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchVirtualLog> convertAddDOList(List<AddSchVirtualLogDTO> addSchVirtualLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchVirtualLog> convertEditDOList(List<EditSchVirtualLogDTO> editSchVirtualLogDTO);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
SchVirtualLogVO convertVO(SchVirtualLog schVirtualLog);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
List<SchVirtualLogVO> convertVO(List<SchVirtualLog> schVirtualLogList);
|
|
||||||
|
|
||||||
@Mappings({})
|
|
||||||
PageResult<SchVirtualLogVO> convertVO(PageResult<SchVirtualLog> pageResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectErrorLog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器异常日志 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectErrorLogDao extends IBaseDao<SchCollectErrorLog> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectErrorLog findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollectErrorLog 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollectErrorLog schCollectErrorLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollectErrorLog 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollectErrorLog schCollectErrorLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectErrorLog> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecord;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectRecordDao extends IBaseDao<SchCollectRecord> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectRecord findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollectRecord 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollectRecord schCollectRecord);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollectRecord 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollectRecord schCollectRecord);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectRecord> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecordRetryLog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表重试表 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectRecordRetryLogDao extends IBaseDao<SchCollectRecordRetryLog> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectRecordRetryLog findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollectRecordRetryLog 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollectRecordRetryLog schCollectRecordRetryLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollectRecordRetryLog 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollectRecordRetryLog schCollectRecordRetryLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectRecordRetryLog> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorConfig;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器配置 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorConfigDao extends IBaseDao<SchCollectorConfig> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorConfig findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollectorConfig 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollectorConfig schCollectorConfig);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollectorConfig 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollectorConfig schCollectorConfig);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorConfig> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollector;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器管理 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorDao extends IBaseDao<SchCollector> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollector findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollector 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollector schCollector);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollector 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollector schCollector);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollector> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersion;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表管理 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorVersionDao extends IBaseDao<SchCollectorVersion> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorVersion findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollectorVersion 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollectorVersion schCollectorVersion);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollectorVersion 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollectorVersion schCollectorVersion);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorVersion> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据采集器id和版本号查询是否重复
|
|
||||||
*
|
|
||||||
* @param collectorId 采集器id
|
|
||||||
* @param collectorVersionNo 版本号码
|
|
||||||
* @return SchCollectorVersion
|
|
||||||
*/
|
|
||||||
SchCollectorVersion findByVersion(Long collectorId, String collectorVersionNo);
|
|
||||||
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionFile;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表更新包管理 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorVersionFileDao extends IBaseDao<SchCollectorVersionFile> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorVersionFile findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollectorVersionFile 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollectorVersionFile schCollectorVersionFile);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollectorVersionFile 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollectorVersionFile schCollectorVersionFile);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorVersionFile> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
SchCollectorVersionFile findByVersionIdAndCollectorId(Long collectorId, Long collectorVersionId);
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionLog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本更新日志管理 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorVersionLogDao extends IBaseDao<SchCollectorVersionLog> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorVersionLog findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schCollectorVersionLog 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchCollectorVersionLog schCollectorVersionLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schCollectorVersionLog 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchCollectorVersionLog schCollectorVersionLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorVersionLog> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchOperationLog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集调度器操作日志 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchOperationLogDao extends IBaseDao<SchOperationLog> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchOperationLog findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schOperationLog 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchOperationLog schOperationLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schOperationLog 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchOperationLog schOperationLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchOperationLog> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchSystemParams;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统参数表 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchSystemParamsDao extends IBaseDao<SchSystemParams> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchSystemParams findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schSystemParams 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchSystemParams schSystemParams);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schSystemParams 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchSystemParams schSystemParams);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchSystemParams> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchTerminator;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 执行管理器 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchTerminatorDao extends IBaseDao<SchTerminator> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchTerminator findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schTerminator 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchTerminator schTerminator);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schTerminator 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchTerminator schTerminator);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchTerminator> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.dao;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchVirtualLog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 虚拟机使用情况 数据访问接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchVirtualLogDao extends IBaseDao<SchVirtualLog> {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchVirtualLog findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param schVirtualLog 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(SchVirtualLog schVirtualLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param schVirtualLog 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(SchVirtualLog schVirtualLog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids 主键ids
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchVirtualLog> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectErrorLog;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集器异常日志 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectErrorLogMapper extends BaseMapper<SchCollectErrorLog> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecord;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集记录表 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectRecordMapper extends BaseMapper<SchCollectRecord> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecordRetryLog;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集记录表重试表 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectRecordRetryLogMapper extends BaseMapper<SchCollectRecordRetryLog> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorConfig;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集器配置 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorConfigMapper extends BaseMapper<SchCollectorConfig> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollector;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集器管理 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorMapper extends BaseMapper<SchCollector> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionFile;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集器版本列表更新包管理 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorVersionFileMapper extends BaseMapper<SchCollectorVersionFile> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionLog;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集器版本更新日志管理 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorVersionLogMapper extends BaseMapper<SchCollectorVersionLog> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersion;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集器版本列表管理 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchCollectorVersionMapper extends BaseMapper<SchCollectorVersion> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchOperationLog;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 采集调度器操作日志 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchOperationLogMapper extends BaseMapper<SchOperationLog> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchSystemParams;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 系统参数表 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchSystemParamsMapper extends BaseMapper<SchSystemParams> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchTerminator;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 执行管理器 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchTerminatorMapper extends BaseMapper<SchTerminator> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.docus.server.infrastructure.mapper;
|
|
||||||
|
|
||||||
import com.docus.server.entity.scheduling.management.SchVirtualLog;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 虚拟机使用情况 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface SchVirtualLogMapper extends BaseMapper<SchVirtualLog> {
|
|
||||||
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.CommMsgDTO;
|
|
||||||
|
|
||||||
public interface ICommMsgService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 向客户端发送TCP命令
|
|
||||||
*
|
|
||||||
* @param commMsgDTO 消息体
|
|
||||||
*/
|
|
||||||
void clientCommand(CommMsgDTO commMsgDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 向所有客户端发送TCP命令
|
|
||||||
*
|
|
||||||
* @param commMsgDTO 消息体
|
|
||||||
*/
|
|
||||||
void clientsCommand(CommMsgDTO commMsgDTO);
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversionfile.UploadFileVO;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface IFileUploadService {
|
|
||||||
|
|
||||||
List<UploadFileVO> uploadFile(MultipartFile[] multipartFiles, String pathKey) throws Exception;
|
|
||||||
|
|
||||||
void downloadFile(String filePath, HttpServletResponse response);
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.AddSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.DeleteSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollecterrorlog.EditSchCollectErrorLogDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollecterrorlog.SchCollectErrorLogVO;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器异常日志 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectErrorLogService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectErrorLogVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectErrorLogDTO 新增参数
|
|
||||||
* @param multipartFiles 异常任务截图
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchCollectErrorLogDTO addSchCollectErrorLogDTO, MultipartFile[] multipartFiles) throws Exception;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectErrorLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectErrorLogDTO editSchCollectErrorLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectErrorLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectErrorLogDTO deleteSchCollectErrorLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectErrorLogVO> search(SearchDTO searchDTO);
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.task.ReportDownTwoDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.AddSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.DeleteSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecordretrylog.EditSchCollectRecordRetryLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.NettyTerminatorDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecordRetryLog;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecordretrylog.SchCollectRecordRetryLogVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表重试表 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectRecordRetryLogService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectRecordRetryLogVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectRecordRetryLogDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
SchCollectRecordRetryLog add(AddSchCollectRecordRetryLogDTO addSchCollectRecordRetryLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectRecordRetryLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectRecordRetryLogDTO editSchCollectRecordRetryLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectRecordRetryLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectRecordRetryLogDTO deleteSchCollectRecordRetryLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectRecordRetryLogVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
SchCollectRecordRetryLog saveOrUpdateRecordRetryLog(NettyTerminatorDTO terminal, ReportDownTwoDTO reportDownTwoDTO);
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.task.ReportDownTwoDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.AddSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.DeleteSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectrecord.EditSchCollectRecordDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.NettyTerminatorDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectRecord;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectrecord.SchCollectRecordVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集记录表 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectRecordService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectRecordVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectRecordDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
SchCollectRecord add(AddSchCollectRecordDTO addSchCollectRecordDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectRecordDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectRecordDTO editSchCollectRecordDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectRecordDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectRecordDTO deleteSchCollectRecordDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectRecordVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
SchCollectRecord saveOrUpdateRecord(NettyTerminatorDTO terminal, ReportDownTwoDTO messageContent);
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.AddSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.DeleteSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorconfig.EditSchCollectorConfigDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorconfig.SchCollectorConfigVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器配置 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorConfigService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorConfigVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorConfigDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchCollectorConfigDTO addSchCollectorConfigDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorConfigDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectorConfigDTO editSchCollectorConfigDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorConfigDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectorConfigDTO deleteSchCollectorConfigDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorConfigVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新采集器配置
|
|
||||||
*/
|
|
||||||
void updateCollectorConfig();
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.AddSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.DeleteSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.EditSchCollectorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollector.UpdateSchCollectorDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollector;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollector.SchCollectorVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器管理 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchCollectorDTO addSchCollectorDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectorDTO editSchCollectorDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectorDTO deleteSchCollectorDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选为当前版本并更新
|
|
||||||
*
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean updateVersion(UpdateSchCollectorDTO schCollector);
|
|
||||||
|
|
||||||
SchCollector findByCollectorId(String collectorId);
|
|
||||||
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.AddSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.DeleteSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionfile.EditSchCollectorVersionFileDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersionFile;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversionfile.SchCollectorVersionFileVO;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表更新包管理 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorVersionFileService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorVersionFileVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorVersionFileDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchCollectorVersionFileDTO addSchCollectorVersionFileDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorVersionFileDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectorVersionFileDTO editSchCollectorVersionFileDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorVersionFileDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectorVersionFileDTO deleteSchCollectorVersionFileDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorVersionFileVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增版本和版本文件
|
|
||||||
*/
|
|
||||||
void addVersionAndFile(AddSchCollectorVersionFileDTO addSchCollectorVersionFileDTO, MultipartFile[] multipartFiles) throws Exception;
|
|
||||||
|
|
||||||
SchCollectorVersionFile findByCollectorIdAndVersionId(Long collectorId, Long collectorVersionId);
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.AddSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.DeleteSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversionlog.EditSchCollectorVersionLogDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversionlog.SchCollectorVersionLogVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本更新日志管理 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorVersionLogService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorVersionLogVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorVersionLogDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchCollectorVersionLogDTO addSchCollectorVersionLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorVersionLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectorVersionLogDTO editSchCollectorVersionLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorVersionLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectorVersionLogDTO deleteSchCollectorVersionLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorVersionLogVO> search(SearchDTO searchDTO);
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.AddSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.DeleteSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schcollectorversion.EditSchCollectorVersionDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchCollectorVersion;
|
|
||||||
import com.docus.server.vo.scheduling.management.schcollectorversion.SchCollectorVersionVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器版本列表管理 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchCollectorVersionService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchCollectorVersionVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchCollectorVersionDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchCollectorVersionDTO addSchCollectorVersionDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchCollectorVersionDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchCollectorVersionDTO editSchCollectorVersionDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchCollectorVersionDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchCollectorVersionDTO deleteSchCollectorVersionDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchCollectorVersionVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当前采集器和版本号是否重复
|
|
||||||
* @param collectorId
|
|
||||||
* @param collectorVersionNo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
SchCollectorVersion findByVersion(Long collectorId, String collectorVersionNo);
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.AddSchOperationLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.DeleteSchOperationLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schoperationlog.EditSchOperationLogDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schoperationlog.SchOperationLogVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集调度器操作日志 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchOperationLogService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchOperationLogVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchOperationLogDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchOperationLogDTO addSchOperationLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchOperationLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchOperationLogDTO editSchOperationLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchOperationLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchOperationLogDTO deleteSchOperationLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchOperationLogVO> search(SearchDTO searchDTO);
|
|
||||||
}
|
|
@ -1,69 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.AddSchSystemParamsDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.DeleteSchSystemParamsDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schsystemparams.EditSchSystemParamsDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchSystemParams;
|
|
||||||
import com.docus.server.vo.scheduling.management.schsystemparams.SchSystemParamsVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统参数表 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchSystemParamsService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchSystemParamsVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchSystemParamsDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchSystemParamsDTO addSchSystemParamsDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchSystemParamsDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchSystemParamsDTO editSchSystemParamsDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchSystemParamsDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchSystemParamsDTO deleteSchSystemParamsDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchSystemParamsVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采集器id获取采集器名称
|
|
||||||
*
|
|
||||||
* @param paramValueIds 采集器ids
|
|
||||||
* @return Map<String, SchSystemParams>
|
|
||||||
*/
|
|
||||||
Map<String, SchSystemParams> find(List<Long> paramValueIds);
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.AddSchTerminatorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.DeleteSchTerminatorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.EditSchTerminatorDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schterminator.NettyTerminatorDTO;
|
|
||||||
import com.docus.server.entity.scheduling.management.SchTerminator;
|
|
||||||
import com.docus.server.vo.scheduling.management.schterminator.SchTerminatorVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 执行管理器 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchTerminatorService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchTerminatorVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchTerminatorDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchTerminatorDTO addSchTerminatorDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchTerminatorDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchTerminatorDTO editSchTerminatorDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchTerminatorDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchTerminatorDTO deleteSchTerminatorDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchTerminatorVO> search(SearchDTO searchDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增或更新
|
|
||||||
* @param terminatorIp
|
|
||||||
* @param nettyTerminatorDTO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
SchTerminatorVO saveOrUpdate(String terminatorIp, NettyTerminatorDTO nettyTerminatorDTO);
|
|
||||||
|
|
||||||
List<SchTerminator> findAll();
|
|
||||||
|
|
||||||
void batchUpdate(List<SchTerminator> terminators);
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
package com.docus.server.service;
|
|
||||||
|
|
||||||
import com.docus.infrastructure.web.request.SearchDTO;
|
|
||||||
import com.docus.infrastructure.web.response.PageResult;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.AddSchVirtualLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.DeleteSchVirtualLogDTO;
|
|
||||||
import com.docus.server.dto.scheduling.management.schvirtuallog.EditSchVirtualLogDTO;
|
|
||||||
import com.docus.server.vo.scheduling.management.schvirtuallog.SchVirtualLogVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 虚拟机使用情况 服务接口
|
|
||||||
*
|
|
||||||
* @author AutoGenerator
|
|
||||||
* @since 2023-07-15
|
|
||||||
*/
|
|
||||||
public interface ISchVirtualLogService {
|
|
||||||
/**
|
|
||||||
* 按主键查询
|
|
||||||
*
|
|
||||||
* @param id 主键id
|
|
||||||
* @return 实体
|
|
||||||
*/
|
|
||||||
SchVirtualLogVO findById(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param addSchVirtualLogDTO 新增参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean add(AddSchVirtualLogDTO addSchVirtualLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param editSchVirtualLogDTO 编辑参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
boolean edit(EditSchVirtualLogDTO editSchVirtualLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param deleteSchVirtualLogDTO 删除参数
|
|
||||||
* @return 成功或失败
|
|
||||||
*/
|
|
||||||
int delete(DeleteSchVirtualLogDTO deleteSchVirtualLogDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字搜索
|
|
||||||
*
|
|
||||||
* @param searchDTO 搜索参数
|
|
||||||
* @return 分页列表
|
|
||||||
*/
|
|
||||||
PageResult<SchVirtualLogVO> search(SearchDTO searchDTO);
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue