From dc3f9cc91759823ce59486f19b138be4b296a0f1 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 28 四月 2026 09:43:28 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/network/ZyStationConnectDriver.java | 25 +++++--------------------
1 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/src/main/java/com/zy/core/network/ZyStationConnectDriver.java b/src/main/java/com/zy/core/network/ZyStationConnectDriver.java
index c6c86f2..245216f 100644
--- a/src/main/java/com/zy/core/network/ZyStationConnectDriver.java
+++ b/src/main/java/com/zy/core/network/ZyStationConnectDriver.java
@@ -10,10 +10,9 @@
import com.zy.core.network.entity.ZyStationStatusEntity;
import java.util.List;
import com.zy.core.network.fake.ZyStationFakeSegConnect;
-import com.zy.core.network.fake.ZyStationV4FakeSegConnect;
import com.zy.core.network.real.ZyStationRealConnect;
import com.zy.core.network.real.ZyStationV3RealConnect;
-import com.zy.core.network.real.ZyStationV4RealConnect;
+import com.zy.core.network.real.ZyStationV5RealConnect;
import lombok.extern.slf4j.Slf4j;
import java.util.Collections;
import java.util.concurrent.Executors;
@@ -29,7 +28,6 @@
public class ZyStationConnectDriver implements ThreadHandler {
private static final ZyStationFakeSegConnect zyStationFakeSegConnect = new ZyStationFakeSegConnect();
- private static final ZyStationV4FakeSegConnect zyStationV4FakeSegConnect = new ZyStationV4FakeSegConnect();
private static final long SEND_LOCK_WARN_MS = 500L;
private static final long SEND_COST_WARN_MS = 5_000L;
private static final long SEND_LOCK_POLL_MS = 20L;
@@ -74,27 +72,14 @@
if (deviceConfig.getFake() == 0) {
if ("ZyStationV3Thread".equals(deviceConfig.getThreadImpl())) {
connectApi = new ZyStationV3RealConnect(deviceConfig, redisUtil);
- } else if ("ZyStationV4Thread".equals(deviceConfig.getThreadImpl())
- || "ZyStationV5Thread".equals(deviceConfig.getThreadImpl())) {
- connectApi = new ZyStationV4RealConnect(deviceConfig, redisUtil);
+ } else if ("ZyStationV5Thread".equals(deviceConfig.getThreadImpl())) {
+ connectApi = new ZyStationV5RealConnect(deviceConfig, redisUtil);
} else {
connectApi = new ZyStationRealConnect(deviceConfig, redisUtil);
}
} else {
- if ("ZyStationV3Thread".equals(deviceConfig.getThreadImpl())) {
- zyStationFakeSegConnect.addFakeConnect(deviceConfig, redisUtil);
- connectApi = zyStationFakeSegConnect;
- } else if ("ZyStationV4Thread".equals(deviceConfig.getThreadImpl())
- || "ZyStationV5Thread".equals(deviceConfig.getThreadImpl())) {
- zyStationV4FakeSegConnect.addFakeConnect(deviceConfig, redisUtil);
- connectApi = zyStationV4FakeSegConnect;
- } else {
- fakeConfigUnsupported = true;
- zyStationConnectApi = null;
- log.error("鏃х増杈撻�佺珯 fake 宸茬Щ闄わ紝deviceNo={}, threadImpl={}, 璇峰垏鎹㈠埌 ZyStationV3Thread銆乑yStationV4Thread 鎴� ZyStationV5Thread",
- deviceConfig.getDeviceNo(), deviceConfig.getThreadImpl());
- return false;
- }
+ zyStationFakeSegConnect.addFakeConnect(deviceConfig, redisUtil);
+ connectApi = zyStationFakeSegConnect;
}
boolean connect = connectApi.connect();
--
Gitblit v1.9.1