From 50da1f165cc96d49d72694606920b77c74e1747c Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期四, 04 一月 2024 10:57:26 +0800
Subject: [PATCH] 调整KFKA数据推送测试2
---
src/main/java/com/fzzy/protocol/weightyh/MessageConsumer.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/fzzy/protocol/weightyh/MessageConsumer.java b/src/main/java/com/fzzy/protocol/weightyh/MessageConsumer.java
index b41d6c9..4d88ea0 100644
--- a/src/main/java/com/fzzy/protocol/weightyh/MessageConsumer.java
+++ b/src/main/java/com/fzzy/protocol/weightyh/MessageConsumer.java
@@ -1,5 +1,6 @@
package com.fzzy.protocol.weightyh;
+import com.fzzy.api.data.GatewayDeviceType;
import com.fzzy.api.utils.BytesUtil;
import com.fzzy.api.utils.SpringUtil;
import com.fzzy.gateway.GatewayUtils;
@@ -82,7 +83,10 @@
reqData.setProductId(device.getProductId());
reqData.setDeviceName(device.getDeviceName());
reqData.setWeight(weigh);
- gatewayRemoteManager.getDeviceReportService(device.getPushProtocol()).reportWeightData(reqData);
+
+ if (weigh > 0) {
+ gatewayRemoteManager.getDeviceReportService(device.getPushProtocol()).reportWeightData(reqData);
+ }
}
/**
--
Gitblit v1.9.3