|
|
@@ -29,6 +29,7 @@ import com.zswl.dataservice.service.mqtt.GateWayInfoService;
|
|
|
import com.zswl.dataservice.service.payment.HxzService;
|
|
|
import com.zswl.dataservice.type.FunctionType;
|
|
|
import com.zswl.dataservice.type.OperationType;
|
|
|
+import com.zswl.dataservice.utils.CommonUtil;
|
|
|
import com.zswl.dataservice.utils.DateUtils;
|
|
|
import com.zswl.dataservice.utils.TokenUtil;
|
|
|
import com.zswl.dataservice.utils.bean.BeanUtils;
|
|
|
@@ -226,12 +227,16 @@ public class OperationMessageService {
|
|
|
event = arr[arr.length - 1];
|
|
|
jsonObject.put("event", event);
|
|
|
}
|
|
|
-
|
|
|
- log.info("Topic: {}", topicName);
|
|
|
+ // 是否是测试
|
|
|
+ boolean isTest = true;
|
|
|
// ping不执行
|
|
|
-// if (event.equals("ping")) {
|
|
|
-// return;
|
|
|
-// }
|
|
|
+ if (isTest && event.equals("ping")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(isTest) {
|
|
|
+ id = CommonUtil.UUID();
|
|
|
+ }
|
|
|
+ log.info("Topic: {} {}", event, topicName);
|
|
|
|
|
|
String gateWayId = jsonObject.getStr("gatewayId");
|
|
|
String deviceId = jsonObject.getStr("deviceId");
|