From 6cfe7b4094c1babbedfd6332e9f759c091beaae6 Mon Sep 17 00:00:00 2001
From: vince <757871790@qq.com>
Date: 星期三, 15 十一月 2023 13:01:18 +0800
Subject: [PATCH] 增加授权

---
 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