From 08c8e4374dd525c6dc7855d1a35113152aea8f2f Mon Sep 17 00:00:00 2001 From: xy <748613696@qq.com> Date: Wed, 31 Jul 2024 15:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A3=85=E7=BD=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/njcn/access/service/impl/CsDeviceServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iot-access/access-boot/src/main/java/com/njcn/access/service/impl/CsDeviceServiceImpl.java b/iot-access/access-boot/src/main/java/com/njcn/access/service/impl/CsDeviceServiceImpl.java index 817ab7b..3a77bfc 100644 --- a/iot-access/access-boot/src/main/java/com/njcn/access/service/impl/CsDeviceServiceImpl.java +++ b/iot-access/access-boot/src/main/java/com/njcn/access/service/impl/CsDeviceServiceImpl.java @@ -229,6 +229,7 @@ public class CsDeviceServiceImpl implements ICsDeviceService { CsLedgerParam param = new CsLedgerParam(); AppLineTopologyDiagramPO appLineTopologyDiagramPo = new AppLineTopologyDiagramPO(); po.setName(item.getName()); + po.setDeviceId(vo.getId()); po.setPosition(item.getPosition()); po.setClDid(0); if (Objects.equals(DicDataEnum.GRID_SIDE.getCode(),location)){ @@ -529,7 +530,7 @@ public class CsDeviceServiceImpl implements ICsDeviceService { reqAndResParam.setPri(AccessEnum.FIRST_CHANNEL.getCode()); reqAndResParam.setType(Integer.parseInt(TypeEnum.TYPE_1.getCode())); reqAndResParam.setExpire(-1); - logger.info("询问主题报文为:" + new Gson().toJson(reqAndResParam)); + logger.info("询问主题报文为:{}", new Gson().toJson(reqAndResParam)); publisher.send("/Pfm/DevTopic/"+nDid, new Gson().toJson(reqAndResParam),1,false); } @@ -549,7 +550,7 @@ public class CsDeviceServiceImpl implements ICsDeviceService { accessDto.setNdid(nDid); accessDto.setDevType(devType); reqAndResParam.setMsg(accessDto); - logger.info("注册报文为:" + new Gson().toJson(reqAndResParam)); + logger.info("注册报文为:{}", new Gson().toJson(reqAndResParam)); publisher.send("/Pfm/DevReg/"+nDid, new Gson().toJson(reqAndResParam),1,false); }