设备主题获取录入
This commit is contained in:
@@ -27,6 +27,7 @@ public enum AccessResponseEnum {
|
||||
DEV_IS_NOT_WG("A0303","注册装置不是网关!"),
|
||||
|
||||
REGISTER_RESPONSE_ERROR("A0304","装置注册,装置侧应答失败!"),
|
||||
RESPONSE_ERROR("A0304","装置请求响应错误!"),
|
||||
|
||||
DEV_TYPE_NOT_FIND("A0305","装置类型未找到,需要录入!"),
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.njcn.access.pojo.param;
|
||||
|
||||
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/4/20 14:05
|
||||
*/
|
||||
@Data
|
||||
public class ReqAndResParam implements Serializable {
|
||||
|
||||
@SerializedName("Mid")
|
||||
@ApiModelProperty("报文ID,在请求报文中该值为请求ID")
|
||||
@NotNull(message = "报文ID不能为空")
|
||||
private Integer mid;
|
||||
|
||||
@SerializedName("Did")
|
||||
@ApiModelProperty("设备唯一标识lDid,填入0代表nDid")
|
||||
@NotBlank(message = "设备唯一标识lDid不能为空")
|
||||
private String did;
|
||||
|
||||
@SerializedName("Pri")
|
||||
@ApiModelProperty("报文处理的优先级")
|
||||
@NotNull(message = "报文处理的优先级不能为空")
|
||||
private Integer pri;
|
||||
|
||||
@SerializedName("Type")
|
||||
@ApiModelProperty("消息类型")
|
||||
@NotNull(message = "消息类型不能为空")
|
||||
private String type;
|
||||
|
||||
@SerializedName("Msg")
|
||||
@ApiModelProperty("报文内容")
|
||||
private Object msg;
|
||||
|
||||
/**
|
||||
* 请求报文
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class Req extends ReqAndResParam {
|
||||
@SerializedName("Expire")
|
||||
@ApiModelProperty("此报文过期的相对时间,单位秒,该字段为-1时表示永不过期.控制类报文接收者超时处理按此时间")
|
||||
@NotNull(message = "报文过期的相对时间不能为空")
|
||||
private Integer expire;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应答报文
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class Res extends ReqAndResParam {
|
||||
@SerializedName("Code")
|
||||
@ApiModelProperty("标识应答的返回码")
|
||||
@NotNull(message = "状态码不能为空")
|
||||
private Integer code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-07-13
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("cs_topic")
|
||||
public class CsTopic extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 设备识别码
|
||||
*/
|
||||
private String ndid;
|
||||
|
||||
/**
|
||||
* 主题名称
|
||||
*/
|
||||
private String topic;
|
||||
|
||||
/**
|
||||
* 主题类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.njcn.access.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.sun.javafx.beans.IDProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-12
|
||||
*/
|
||||
@Data
|
||||
@TableName("cs_topic")
|
||||
public class CsTopicPO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
private String ndid;
|
||||
|
||||
private String topic;
|
||||
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user