|
|
@@ -0,0 +1,130 @@
|
|
|
+package com.zswl.dataservice.model.artemis;
|
|
|
+
|
|
|
+import com.zswl.dataservice.domain.mqtt.DeviceInfo;
|
|
|
+import com.zswl.dataservice.domain.mqtt.GateWayInfo;
|
|
|
+import com.zswl.dataservice.model.baseParam.SuperModel;
|
|
|
+import com.zswl.dataservice.model.mqtt.DeviceInfoModel;
|
|
|
+import com.zswl.dataservice.model.mqtt.GateWayInfoModel;
|
|
|
+import com.zswl.dataservice.type.OperationType;
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
+import lombok.Data;
|
|
|
+import org.springframework.data.mongodb.core.index.Indexed;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author TRX
|
|
|
+ * @date 2024/5/21
|
|
|
+ */
|
|
|
+@Data
|
|
|
+public class OperationMessageModel extends SuperModel {
|
|
|
+
|
|
|
+ @Schema(description = "mqtt服务器消息ID")
|
|
|
+ private String messageId;
|
|
|
+
|
|
|
+ @Schema(description = "topic")
|
|
|
+ private String topic;
|
|
|
+
|
|
|
+ @Schema(description = "终端ID")
|
|
|
+ private String clientId;
|
|
|
+
|
|
|
+ @Schema(description = "业务生成的ID")
|
|
|
+ private String dataId;
|
|
|
+
|
|
|
+ @Schema(description = "消息内容")
|
|
|
+ private Object data;
|
|
|
+
|
|
|
+ @Schema(description = "ttl时间(毫秒数)")
|
|
|
+ private Long ttlTime;
|
|
|
+
|
|
|
+ @Schema(description = "发送时间")
|
|
|
+ private Long sendTime;
|
|
|
+
|
|
|
+ @Schema(description = "接收的消息是否超时")
|
|
|
+ private Boolean isTimeOut;
|
|
|
+
|
|
|
+ @Schema(description = "处理标记,判断用那个业务方法处理")
|
|
|
+ private String event;
|
|
|
+
|
|
|
+ //------------------------关联的消息
|
|
|
+
|
|
|
+ @Schema(description = "消息的类型")
|
|
|
+ private String messageClass;
|
|
|
+
|
|
|
+ @Schema(description = "关于的设备信息")
|
|
|
+ private DeviceInfoModel deviceInfo;
|
|
|
+
|
|
|
+ @Schema(description = "设备ID")
|
|
|
+ private String deviceId;
|
|
|
+
|
|
|
+ @Schema(description = "关于的网关信息")
|
|
|
+ private GateWayInfoModel gateWayInfo;
|
|
|
+
|
|
|
+ @Schema(description = "网关ID")
|
|
|
+ private String gateWayId;
|
|
|
+
|
|
|
+ @Schema(description = "消息创建时间")
|
|
|
+ private String time;
|
|
|
+
|
|
|
+ @Schema(description = "mqtt消息类型: 发送 接收")
|
|
|
+ OperationType operationType;
|
|
|
+
|
|
|
+ private String operationTypeStr;
|
|
|
+
|
|
|
+ public String getOperationTypeStr() {
|
|
|
+ if (operationType != null) {
|
|
|
+ return operationType.getRemark();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ // --------------------- 消息处理结果信息 start -------------------
|
|
|
+ @Schema(description = "是否收到信息")
|
|
|
+ private Boolean isReceive;
|
|
|
+
|
|
|
+ @Schema(description = "接收到的时间")
|
|
|
+ private Long receiveTime;
|
|
|
+
|
|
|
+ @Schema(description = "接收到的时间可阅读的")
|
|
|
+ private String receiveTimeStr;
|
|
|
+
|
|
|
+ //-------------------业务处理结果 start----------------
|
|
|
+
|
|
|
+ @Schema(description = "是否处理成功")
|
|
|
+ private Boolean isHandleSuccess;
|
|
|
+
|
|
|
+ @Schema(description = "业务结果数据")
|
|
|
+ private Object resultData;
|
|
|
+
|
|
|
+ @Schema(description = "处理结果")
|
|
|
+ private String handleMsg;
|
|
|
+
|
|
|
+ @Schema(description = "业务处理的bean")
|
|
|
+ private String beanName;
|
|
|
+
|
|
|
+ @Schema(description = "业务处理的方法")
|
|
|
+ private String methodName;
|
|
|
+
|
|
|
+ @Schema(description = "处理时间")
|
|
|
+ private Long handlerTime;
|
|
|
+
|
|
|
+ //--------------------返回数据 start ------------------
|
|
|
+ @Schema(description = "是否响应成功")
|
|
|
+ private Boolean isResult = Boolean.FALSE;
|
|
|
+
|
|
|
+ @Schema(description = "返回的topic")
|
|
|
+ private String reTopic;
|
|
|
+
|
|
|
+ @Schema(description = "返回-处理时间")
|
|
|
+ private Long reTime;
|
|
|
+
|
|
|
+ @Schema(description = "返回-处理时间可阅读")
|
|
|
+ private String reTimeStr;
|
|
|
+
|
|
|
+ @Schema(description = "响应结果")
|
|
|
+ private String reMsg;
|
|
|
+
|
|
|
+ @Schema(description = "是否响应成功")
|
|
|
+ private Boolean reIsSuccess;
|
|
|
+
|
|
|
+}
|