From e3fcf332eff28c90c31dc5f982035d50691fa9c3 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <xltys1995> Date: 星期四, 27 八月 2020 15:32:18 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/thread/CrnThread.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/core/thread/CrnThread.java b/src/main/java/com/zy/core/thread/CrnThread.java index c2881f7..73e2b60 100644 --- a/src/main/java/com/zy/core/thread/CrnThread.java +++ b/src/main/java/com/zy/core/thread/CrnThread.java @@ -47,7 +47,7 @@ while (true) { try { int step = 1; - Task task = MessageQueue.poll(SlaveType.Devp, slave.getId()); + Task task = MessageQueue.poll(SlaveType.Crn, slave.getId()); if (task != null) { step = task.getStep(); } @@ -182,7 +182,7 @@ BasCrnpService basCrnpService = SpringUtils.getBean(BasCrnpService.class); BasCrnp basCrnp = new BasCrnp(); basCrnp.setCrnNo(slave.getId()); - if (basCrnpService.updateById(crnProtocol.toSqlModel(basCrnp))){ + if (!basCrnpService.updateById(crnProtocol.toSqlModel(basCrnp))){ log.error("鍫嗗灈鏈簆lc鏁版嵁搴撴洿鏂板け璐� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); } @@ -254,7 +254,8 @@ public static void main(String[] args) throws InterruptedException { CrnSlave slave = new CrnSlave(); slave.setId(1); - slave.setIp("192.168.6.9"); + slave.setIp("192.168.3.39"); + slave.setPort(5015); slave.setRack(0); slave.setSlot(0); CrnThread crnThread = new CrnThread(slave); -- Gitblit v1.9.1