|
|
@@ -1,9 +1,8 @@
|
|
|
package com.zhongshu.iot.client.model.artemis;
|
|
|
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
-import com.zhongshu.iot.client.model.artemis.OperationMessageModel;
|
|
|
import com.zhongshu.iot.client.model.baseParam.SuperModel;
|
|
|
-import com.zhongshu.iot.client.model.iot.IotMainModel;
|
|
|
+import com.zhongshu.iot.client.type.OperationType;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
@@ -19,6 +18,19 @@ import lombok.NoArgsConstructor;
|
|
|
public class OperationMessageResultModel extends SuperModel {
|
|
|
|
|
|
//---------------------消息相关信息 start------------------
|
|
|
+
|
|
|
+ @Schema(description = "mqtt消息类型: 发送 接收")
|
|
|
+ private OperationType operationType;
|
|
|
+
|
|
|
+ private String operationTypeStr;
|
|
|
+
|
|
|
+ public String operationTypeStr() {
|
|
|
+ if (operationType != null) {
|
|
|
+ return operationType.getRemark();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
@Schema(description = "设备ID")
|
|
|
private String deviceId;
|
|
|
|
|
|
@@ -28,15 +40,25 @@ public class OperationMessageResultModel extends SuperModel {
|
|
|
@Schema(description = "网关ID")
|
|
|
private String gateWayId;
|
|
|
|
|
|
- @Schema(description = "消息内容")
|
|
|
- private OperationMessageModel operationMessage;
|
|
|
-
|
|
|
- @Schema(description = "关联的事件")
|
|
|
- private IotMainModel iotMain;
|
|
|
+ @Schema(description = "发送数据")
|
|
|
+ private Object data;
|
|
|
|
|
|
@Schema(description = "topic")
|
|
|
private String realIotTopic;
|
|
|
|
|
|
+ //--------------------发送相关 start --------------
|
|
|
+ @Schema(description = "是否发送成功")
|
|
|
+ private Boolean isSendSuccess = Boolean.TRUE;
|
|
|
+
|
|
|
+ @Schema(description = "发送结果")
|
|
|
+ private String sendMsg = "";
|
|
|
+
|
|
|
+ @Schema(description = "是否需要返回")
|
|
|
+ private Boolean isNeedReplay;
|
|
|
+
|
|
|
+ @Schema(description = "replay数据")
|
|
|
+ private JSONObject replayData;
|
|
|
+
|
|
|
//-------------------业务处理结果 start----------------
|
|
|
|
|
|
@Schema(description = "是否处理成功")
|
|
|
@@ -54,13 +76,6 @@ public class OperationMessageResultModel extends SuperModel {
|
|
|
@Schema(description = "处理时间")
|
|
|
private Long handlerTime;
|
|
|
|
|
|
- //--------------------返回数据 start(就是把结果发送给响应网关)-------------
|
|
|
- @Schema(description = "是否需要返回")
|
|
|
- private Boolean isNeedReplay = Boolean.TRUE;
|
|
|
-
|
|
|
- @Schema(description = "replay数据")
|
|
|
- private JSONObject replayData;
|
|
|
-
|
|
|
//--------------------返回数据 start(就是把结果发送给响应网关)-------------
|
|
|
@Schema(description = "是否响应成功")
|
|
|
private Boolean isResult = Boolean.FALSE;
|