#
Junjie
2025-07-07 f953070108efe8d06ccd0c04b92c51a78f03d349
#
2个文件已修改
11 ■■■■■ 已修改文件
src/main/java/com/zy/core/properties/DeviceConfig.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/fake/FakeNyShuttleThread.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/properties/DeviceConfig.java
@@ -17,4 +17,6 @@
    private Boolean fake = false;
    private String fakeInitStatus;
}
src/main/java/com/zy/core/thread/fake/FakeNyShuttleThread.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zy.common.Cools;
import com.zy.common.SpringUtils;
import com.zy.common.utils.RedisUtil;
import com.zy.core.News;
@@ -76,8 +77,14 @@
                    try {
                        ServerSocket serverSocket = new ServerSocket(device.getPort());
                        Socket fakeSocket = serverSocket.accept();
                        String fakeStatus = JSON.toJSONString(fakeStatusDemo);
                        if (!Cools.isEmpty(device.getFakeInitStatus())) {
                            fakeStatus = device.getFakeInitStatus();
                        }
                        fakeServerMap.put(String.valueOf(SlaveType.Shuttle) + device.getDeviceNo(), fakeSocket);
                        fakeStatusMap.put(String.valueOf(SlaveType.Shuttle) + device.getDeviceNo(), JSON.parseObject(JSON.toJSONString(fakeStatusDemo)));
                        fakeStatusMap.put(String.valueOf(SlaveType.Shuttle) + device.getDeviceNo(), JSON.parseObject(fakeStatus));
                        while (true) {
                            if(fakeSocket == null) {
                                fakeServerMap.remove(String.valueOf(SlaveType.Shuttle) + device.getDeviceNo());