TRX 1 سال پیش
والد
کامیت
25d8281556
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      src/main/java/com/zswl/dataservice/service/mqtt/DevicePingInfoService.java

+ 4 - 0
src/main/java/com/zswl/dataservice/service/mqtt/DevicePingInfoService.java

@@ -98,6 +98,10 @@ public class DevicePingInfoService extends SuperService {
     public ResultContent<Object> ping(String dataStr) {
         PingResult pingResult = new PingResult();
         GateWayPingInfoParam param = JSONUtil.toBean(dataStr, GateWayPingInfoParam.class);
+        if (StringUtils.isEmpty(param.getGateWayId())) {
+            pingResult.setFailed("");
+            return ResultContent.buildFail("GateWayId为空");
+        }
         if (StringUtils.isNotEmpty(param.getDeviceId())) {
             devicePing(dataStr);
         } else {