From 39a1a6681f0979e2e7484b44c5beced33c3affba Mon Sep 17 00:00:00 2001 From: wulin Date: Tue, 21 Nov 2023 16:34:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=B5=81=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=9C=AA=E6=8E=A8=E9=80=81=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/qiuguo/iot/third/command/ActionCommand.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java index e169540..7622283 100644 --- a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java +++ b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java @@ -72,15 +72,20 @@ public abstract class ActionCommand { Integer index){ if(baseSession.getRequestId().equals(queue.getRequestId())){ + Integer finish = YesNo.NO.getCode(); String message = ""; if(queue.getQueue().size() > 0){ message = queue.getQueue().poll(); message = StringUtils.getSendStr(sb, message, false); }else if(queue.getStatus() == YesNo.NO.getCode().intValue()){ + finish = 1; if(sb.length() == 0){ //结束了 log.info("发送结束了,请求id:{}", queue.getRequestId()); - return Mono.empty(); + return normalSendMsg(baseSession, message, type, finish, actionSendMessage, index).flatMap(b -> { + return Mono.empty(); + }); + } message = sb.toString(); message = StringUtils.removeStringChars(message); @@ -89,11 +94,11 @@ public abstract class ActionCommand { try{ Thread.sleep(10); }catch(Exception e){ - log.info("等信息信息休息异常{}", e); + log.info("等信息休息异常{}", e); } } if(StringUtils.isNotEmpty(message)){ - return normalSendMsg(baseSession, message, type, YesNo.NO.getCode(), actionSendMessage, index).flatMap(m -> { + return normalSendMsg(baseSession, message, type, finish, actionSendMessage, index).flatMap(m -> { return sendMessage(action, baseSession, queue, sb, type, actionSendMessage, index + 1); }); }