Xiajijian
2025-10-11 c07aeace15bd4265bd34fd4d0afbd1d13603032d
ard-work/src/main/java/com/ard/work/service/impl/TyServiceImpl.java
@@ -77,7 +77,7 @@
    /**
     * 获取天宇token信息
     * 获取六合token信息
     *
     * @return AccessTokenReceiver
     */
@@ -177,7 +177,7 @@
    }
    /**
     * 注册天宇平台
     * 注册六合平台
     */
    @Override
    public Boolean registerMessage() {
@@ -186,7 +186,7 @@
            RegisterCmd registerMessage = new RegisterCmd(tyToken.getCompanyId(), tyToken.getAccessToken().getBytes());
            this.sendMessage(tyConfiguration.getIpPort(), registerMessage);
        } catch (Exception e) {
            log.error("注册天宇平台失败:{}", e.getMessage());
            log.error("注册六合平台失败:{}", e.getMessage());
        }
        return true;
    }
@@ -611,7 +611,7 @@
    }
    /**
     * 处理天宇服务器返回的消息
     * 处理六合服务器返回的消息
     */
    @Override
    public void processReplyMessage(String key, BaseCmd tyCommand) {
@@ -817,7 +817,7 @@
            return;
        }
        long timestamp = System.currentTimeMillis();
        log.debug("定时向天宇发送⼼跳,时间戳{}", timestamp);
        log.debug("定时向六合发送⼼跳,时间戳{}", timestamp);
        HeartbeatCmd heartbeatMessage = new HeartbeatCmd(timestamp);
        this.sendMessage(tyConfiguration.getIpPort(), heartbeatMessage);
    }
@@ -834,9 +834,9 @@
                String host = ipSocket.getHostString();
                int port = ipSocket.getPort();
                channel.writeAndFlush(msg); // 发送编码后的数据
                log.debug("向天宇服务器【{}:{}】发送数据,命令码:{}", host, port, String.format("0x%02X", msg.getCmdCode() & 0xFF));
                log.debug("向六合服务器【{}:{}】发送数据,命令码:{}", host, port, String.format("0x%02X", msg.getCmdCode() & 0xFF));
            } else {
                log.error("与天宇服务器链接断开,无法发送数据!");
                log.error("与六合服务器链接断开,无法发送数据!");
            }
        } catch (Exception e) {
            log.error("发送消息异常:{}", e.getMessage());