package com.ruoyi.dataInterchange.model;
|
|
import com.ruoyi.dataInterchange.pojo.BaseModel;
|
import com.ruoyi.dataInterchange.util.jtt809.common.Jtt809Util;
|
import io.netty.buffer.ByteBuf;
|
import lombok.Data;
|
import org.springframework.data.elasticsearch.annotations.Document;
|
import org.springframework.data.elasticsearch.annotations.Field;
|
import org.springframework.data.elasticsearch.annotations.FieldType;
|
|
/**
|
* 时效口令上报
|
*
|
* @author zhibing.pu
|
* @Date 2025/3/21 9:27
|
*/
|
@Data
|
@Document(indexName = "up_authorize_msg")
|
public class UPAuthorizeMsgStartup extends BaseModel {
|
/**
|
* 子业务类型标识
|
*/
|
@Field(type = FieldType.Integer)
|
private int dataType;
|
/**
|
* 企业视频监控平台唯一编码
|
*/
|
@Field(type = FieldType.Text)
|
private String plateformId;
|
/**
|
* 附属地政府平台使用的时效口令
|
*/
|
@Field(type = FieldType.Text)
|
private String authorizeCode1;
|
/**
|
* 跨域地区政府平台使用的时效口令
|
*/
|
@Field(type = FieldType.Text)
|
private String authorizeCode2;
|
|
|
/**
|
* 解析登录报文
|
*/
|
public UPAuthorizeMsgStartup decode(ByteBuf byteBuf) {
|
try {
|
this.dataType = byteBuf.readShort();
|
this.plateformId = Jtt809Util.readGBKString(byteBuf, 11);
|
this.authorizeCode1 = Jtt809Util.readGBKString(byteBuf, 64);
|
this.authorizeCode2 = Jtt809Util.readGBKString(byteBuf, 64);
|
}catch (Exception e){
|
e.printStackTrace();
|
}
|
return this;
|
}
|
}
|