From 70f61b0638e32274d0e5f9b972ce2a18f139f1b4 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 12 六月 2025 09:51:30 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java
new file mode 100644
index 0000000..676852f
--- /dev/null
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java
@@ -0,0 +1,40 @@
+package com.dy.rtuMw.server.local;
+
+
+import com.dy.common.mw.protocol.Command;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+/**
+ * @Author liurunyu
+ * @Date 2023/12/21 15:17
+ * @LastEditTime 2023/12/21 15:17
+ * @Description
+ */
+public class ReturnCommand {
+
+    private static Logger log = LogManager.getLogger(ReturnCommand.class);
+
+    /**
+     * 澶勭悊鍛戒护鎴愬姛
+     * @param message
+     */
+    public static Command successed(String message, String commandId, String code, Object attachment) {
+        Command command = new Command().createReturnSuccessCommand(message, commandId, code);
+        command.setAttachment(attachment);
+        return command;
+    }
+    /**
+     * 澶勭悊鍛戒护鎴愬姛
+     * @param message
+     */
+    public static Command successed(String message, String commandId, String code) {
+        return new Command().createReturnSuccessCommand(message, commandId, code);
+    }
+    /**
+     * 澶勭悊鍛戒护鍙戠敓閿欒
+     * @param message
+     */
+    public static Command errored(String message, String commandId, String code) {
+        return new Command().createReturnErrorCommand(message, commandId, code);
+    }
+}

--
Gitblit v1.8.0