From 04a01be7461dc8ba86f4295599e13c74827cff6b Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期五, 10 十一月 2023 12:08:35 +0800 Subject: [PATCH] 修复路径BUG --- src/main/java/com/fzzy/gateway/hx2023/service/DeviceReportServiceImpl.java | 16 ++-------------- 1 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/fzzy/gateway/hx2023/service/DeviceReportServiceImpl.java b/src/main/java/com/fzzy/gateway/hx2023/service/DeviceReportServiceImpl.java index f91b0b8..6521ac0 100644 --- a/src/main/java/com/fzzy/gateway/hx2023/service/DeviceReportServiceImpl.java +++ b/src/main/java/com/fzzy/gateway/hx2023/service/DeviceReportServiceImpl.java @@ -28,18 +28,6 @@ } @Override - public String report2GatewayBySn(double weigh, GatewayDevice device) { - - if (null == device) { - log.error("-----------娌℃湁鑾峰彇鍒拌澶囬厤缃俊鎭�-----"); - return "ERROR:娌℃湁鑾峰彇鍒拌澶囬厤缃俊鎭�"; - } - - - return null; - } - - @Override public BaseResp reportGrainData(BaseReqData reqData) { String topic = ScConstant.TOPIC_REPORT; @@ -59,7 +47,7 @@ String topic = ScConstant.TOPIC_MESSAGE_REPORT; - topic = topic.replace("${productId}", reqData.getProductId()).replace("{deviceId}", reqData.getDeviceId()); + topic = topic.replace("${productId}", reqData.getProductId()).replace("${deviceId}", reqData.getDeviceId()); publishService.publishMqttWithTopic(reqData.getData(), topic); @@ -72,7 +60,7 @@ @Override public BaseResp reportLprData(BaseReqData reqData) { String topic = ScConstant.TOPIC_MESSAGE_REPORT; - topic = topic.replace("${productId}", reqData.getProductId()).replace("{deviceId}", reqData.getDeviceId()); + topic = topic.replace("${productId}", reqData.getProductId()).replace("${deviceId}", reqData.getDeviceId()); publishService.publishMqttWithTopic(reqData.getData(), topic); -- Gitblit v1.9.3