|
|
@@ -9,6 +9,7 @@ import jakarta.validation.constraints.NotNull;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
|
|
/**
|
|
|
* 发送消息的参数模型
|
|
|
@@ -24,21 +25,28 @@ public class IotSendParam {
|
|
|
@Schema(description = "标识数据ID, 不传自动生成")
|
|
|
private String dataId;
|
|
|
|
|
|
- @Schema(description = "用户ID")
|
|
|
- @Hidden
|
|
|
- private String userId;
|
|
|
-
|
|
|
@Schema(description = "功能类型,属性 事件 服务")
|
|
|
private FunctionType functionType;
|
|
|
|
|
|
@Schema(description = "标识符,如:ConsumTransactions")
|
|
|
- @NotEmpty(message = "identifier不能为空")
|
|
|
private String identifier;
|
|
|
|
|
|
- @NotEmpty(message = "deviceId不能为空")
|
|
|
+ @Schema(description = "事件、服务名称")
|
|
|
+ private String event = "";
|
|
|
+
|
|
|
+ public String getEvent() {
|
|
|
+ if (ObjectUtils.isNotEmpty(event)) {
|
|
|
+ return event;
|
|
|
+ }
|
|
|
+ return identifier;
|
|
|
+ }
|
|
|
+
|
|
|
@Schema(description = "设备ID")
|
|
|
private String deviceId;
|
|
|
|
|
|
+ @Schema(description = "网关ID")
|
|
|
+ private String gateWayId;
|
|
|
+
|
|
|
@NotNull(message = "data不能为空")
|
|
|
@Schema(description = "数据信息")
|
|
|
private JSONObject data;
|