From f4d696baffce9c3bd8653a3598eb69f0962a5e92 Mon Sep 17 00:00:00 2001
From: zy <zy@123>
Date: 星期四, 17 七月 2025 13:56:42 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/ServerBootstrap.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index ecf3f0a..1b617d9 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -7,6 +7,7 @@
 import com.zy.core.enums.SlaveType;
 import com.zy.core.properties.DeviceConfig;
 import com.zy.core.thread.fake.FakeNyShuttleThread;
+import com.zy.core.thread.fake.FakeZyForkLiftThread;
 import com.zy.core.thread.impl.LfdZyForkLiftMasterThread;
 import com.zy.core.thread.impl.NyShuttleThread;
 import com.zy.core.utils.DeviceMsgUtils;
@@ -29,6 +30,10 @@
 
     @Value("${deviceMsgConfig.gatewayPort}")
     private int gatewayPort;
+    @Value("${deviceMsgConfig.enableFakeDeviceThread}")
+    private boolean enableFakeDeviceThread;
+    @Value("${deviceMsgConfig.enableFake}")
+    private boolean enableFake;
     @Autowired
     private RedisUtil redisUtil;
     @Autowired
@@ -73,8 +78,13 @@
     }
 
     private void initFakeThread(){
-        ThreadHandler thread = new FakeNyShuttleThread(redisUtil, gatewayPort);
+        ThreadHandler thread = new FakeNyShuttleThread(redisUtil, gatewayPort, enableFake, enableFakeDeviceThread);
         new Thread(thread).start();
+        SlaveConnection.put(SlaveType.FakeThread, 1, thread);
+
+        ThreadHandler thread2 = new FakeZyForkLiftThread(redisUtil);
+        new Thread(thread2).start();
+        SlaveConnection.put(SlaveType.FakeThread, 2, thread2);
     }
 
 

--
Gitblit v1.9.1