From 7c8ce9b9a7d3fc1aaa4a621e86415b25ad10a34f Mon Sep 17 00:00:00 2001
From: panlili2024 <14743743+panlili2024@user.noreply.gitee.com>
Date: 星期三, 19 三月 2025 09:36:28 +0800
Subject: [PATCH] 添加source屏扫码流程
---
HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/bean/request/AuthenticateRequest.java | 338 +++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 285 insertions(+), 53 deletions(-)
diff --git a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/bean/request/AuthenticateRequest.java b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/bean/request/AuthenticateRequest.java
index 5dbec51..6aac1aa 100644
--- a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/bean/request/AuthenticateRequest.java
+++ b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/bean/request/AuthenticateRequest.java
@@ -1,5 +1,7 @@
package com.hdl.sdk.connect.bean.request;
+import com.hdl.sdk.common.utils.SPUtils;
+
import java.io.Serializable;
/**
@@ -15,17 +17,37 @@
private AuthenticateDeviceInfoBean objects;//褰撳墠璁惧鍩烘湰淇℃伅
private AuthBean auth;//璁よ瘉淇℃伅
- public String getID() { return id; }
- public void setID(String value) { this.id = value; }
+ public String getID() {
+ return id;
+ }
- public String getTimeStamp() { return time_stamp; }
- public void setTimeStamp(String value) { this.time_stamp = value; }
+ public void setID(String value) {
+ this.id = value;
+ }
- public AuthenticateDeviceInfoBean getObjects() { return objects; }
- public void setObjects(AuthenticateDeviceInfoBean value) { this.objects = value; }
+ public String getTimeStamp() {
+ return time_stamp;
+ }
- public AuthBean getAuth() { return auth; }
- public void setAuth(AuthBean value) { this.auth = value; }
+ public void setTimeStamp(String value) {
+ this.time_stamp = value;
+ }
+
+ public AuthenticateDeviceInfoBean getObjects() {
+ return objects;
+ }
+
+ public void setObjects(AuthenticateDeviceInfoBean value) {
+ this.objects = value;
+ }
+
+ public AuthBean getAuth() {
+ return auth;
+ }
+
+ public void setAuth(AuthBean value) {
+ this.auth = value;
+ }
public AuthenticateRequest(String id, String time_stamp, AuthenticateDeviceInfoBean objects, AuthBean auth) {
this.id = id;
@@ -34,23 +56,79 @@
this.auth = auth;
}
+ /**
+ * 璁よ瘉淇℃伅
+ */
public static class AuthBean implements Serializable {
+ /**
+ * 璁惧MACKey
+ */
private String mac_key;//(mac+secret)鐨勪袱娆d5鍊�
+ /**
+ * 璁惧spk
+ */
private String spk;
+ /**
+ * 璇锋眰淇℃伅
+ */
private RequestBean request;//璁惧鐩稿叧淇℃伅
- public String getMACKey() { return mac_key; }
- public void setMACKey(String value) { this.mac_key = value; }
+ /**
+ * MAC key
+ *
+ * @return
+ */
+ public String getMACKey() {
+ return mac_key;
+ }
- public String getSpk() { return spk; }
- public void setSpk(String value) { this.spk = value; }
+ /**
+ * MACkey
+ *
+ * @param value
+ */
+ public void setMACKey(String value) {
+ this.mac_key = value;
+ SPUtils.put("auth_mackey_key", mac_key);
+ }
- public RequestBean getRequest() { return request; }
- public void setRequest(RequestBean value) { this.request = value; }
+ /**
+ * SPK
+ *
+ * @return
+ */
+ public String getSpk() {
+ return spk;
+ }
+
+ /**
+ * SPK
+ *
+ * @param value
+ */
+ public void setSpk(String value) {
+ this.spk = value;
+ }
+
+ public RequestBean getRequest() {
+ return request;
+ }
+
+ public void setRequest(RequestBean value) {
+ this.request = value;
+ }
public AuthBean() {
}
+
+ /**
+ * 璁よ瘉淇℃伅
+ *
+ * @param mac_key mac key
+ * @param spk 浜у搧spk
+ * @param request 璇锋眰瀵硅薄
+ */
public AuthBean(String mac_key, String spk, RequestBean request) {
this.mac_key = mac_key;
this.spk = spk;
@@ -58,12 +136,17 @@
}
}
- public static class RequestBean implements Serializable{
+ public static class RequestBean implements Serializable {
private String mac;//璁惧mac
private String supplier;//鍘傚
private String hardware_model;//璁惧鍨嬪彿
private String firmware_version;//绋嬪簭鐗堟湰
- public RequestBean(){};
+
+ public RequestBean() {
+ }
+
+ ;
+
public RequestBean(String mac, String supplier, String hardware_model, String firmware_version) {
this.mac = mac;
this.supplier = supplier;
@@ -71,20 +154,80 @@
this.firmware_version = firmware_version;
}
- public String getMAC() { return mac; }
- public void setMAC(String value) { this.mac = value; }
+ /**
+ * 璁惧MAC
+ *
+ * @return
+ */
+ public String getMAC() {
+ return mac;
+ }
- public String getSupplier() { return supplier; }
- public void setSupplier(String value) { this.supplier = value; }
+ /**
+ * 璁惧MAC
+ *
+ * @param value
+ */
+ public void setMAC(String value) {
+ this.mac = value;
+ }
- public String getHardwareModel() { return hardware_model; }
- public void setHardwareModel(String value) { this.hardware_model = value; }
+ /**
+ * 鍘傚
+ *
+ * @return
+ */
+ public String getSupplier() {
+ return supplier;
+ }
- public String getFirmwareVersion() { return firmware_version; }
- public void setFirmwareVersion(String value) { this.firmware_version = value; }
+ /**
+ * 鍘傚
+ *
+ * @param value
+ */
+ public void setSupplier(String value) {
+ this.supplier = value;
+ }
+
+ /**
+ * 纭欢鐗堟湰
+ *
+ * @return
+ */
+ public String getHardwareModel() {
+ return hardware_model;
+ }
+
+ /**
+ * 纭欢鐗堟湰
+ *
+ * @param value
+ */
+ public void setHardwareModel(String value) {
+ this.hardware_model = value;
+ }
+
+ /**
+ * 杞欢鐗堟湰
+ *
+ * @return
+ */
+ public String getFirmwareVersion() {
+ return firmware_version;
+ }
+
+ /**
+ * 杞欢鐗堟湰
+ *
+ * @param value
+ */
+ public void setFirmwareVersion(String value) {
+ this.firmware_version = value;
+ }
}
- public static class AuthenticateDeviceInfoBean implements Serializable{
+ public static class AuthenticateDeviceInfoBean implements Serializable {
private String oid;//璁惧鐨凮id
private String device_mac;//璁惧鐨凪ac
private String device_name;//
@@ -100,148 +243,232 @@
private String gateway_type;
private String hw_version;
private String fw_version;
+ private String supplier;//鍘傚晢
- public String getOID() { return oid; }
+ public String getSupplier() {
+ return supplier;
+ }
+
+ public void setSupplier(String supplier) {
+ this.supplier = supplier;
+ }
+
+ public String getOID() {
+ return oid;
+ }
/**
* 璁惧Oid
+ *
* @param value
*/
- public void setOID(String value) { this.oid = value; }
+ public void setOID(String value) {
+ this.oid = value;
+ }
- public String getDeviceMAC() { return device_mac; }
+ public String getDeviceMAC() {
+ return device_mac;
+ }
/**
* 璁惧Mac
+ *
* @param value
*/
- public void setDeviceMAC(String value) { this.device_mac = value; }
+ public void setDeviceMAC(String value) {
+ this.device_mac = value;
+ }
/**
* 璁惧鍚�
+ *
* @return
*/
- public String getDeviceName() { return device_name; }
+ public String getDeviceName() {
+ return device_name;
+ }
/**
* 璁惧鍚�
+ *
* @param value
*/
- public void setDeviceName(String value) { this.device_name = value; }
+ public void setDeviceName(String value) {
+ this.device_name = value;
+ }
/**
* 璁惧鍨嬪彿
+ *
* @return
*/
- public String getDeviceModel() { return device_model; }
+ public String getDeviceModel() {
+ return device_model;
+ }
/**
* 璁惧鍨嬪彿
+ *
* @param value
*/
- public void setDeviceModel(String value) { this.device_model = value; }
+ public void setDeviceModel(String value) {
+ this.device_model = value;
+ }
/**
* 杩炴帴绫诲瀷锛屾湁绾胯繕鏄棤绾�
+ *
* @return
*/
- public String getAccessMode() { return access_mode; }
+ public String getAccessMode() {
+ return access_mode;
+ }
/**
* 杩炴帴绫诲瀷锛屾湁绾胯繕鏄棤绾�
+ *
* @param value
*/
- public void setAccessMode(String value) { this.access_mode = value; }
+ public void setAccessMode(String value) {
+ this.access_mode = value;
+ }
/**
* 璁惧sid
+ *
* @return
*/
- public String getSid() { return sid; }
+ public String getSid() {
+ return sid;
+ }
/**
* 璁惧sid
+ *
* @param value
*/
- public void setSid(String value) { this.sid = value; }
+ public void setSid(String value) {
+ this.sid = value;
+ }
/**
* 璁惧IPMAC
+ *
* @return
*/
- public String getIPMAC() { return ip_mac; }
+ public String getIPMAC() {
+ return ip_mac;
+ }
/**
* 璁惧IPMAC
+ *
* @param value
*/
- public void setIPMAC(String value) { this.ip_mac = value; }
+ public void setIPMAC(String value) {
+ this.ip_mac = value;
+ }
/**
* 璁惧IP鍦板潃
+ *
* @return
*/
- public String getIPAddress() { return ip_address; }
+ public String getIPAddress() {
+ return ip_address;
+ }
/**
* 璁惧IP鍦板潃
+ *
* @param value
*/
- public void setIPAddress(String value) { this.ip_address = value; }
+ public void setIPAddress(String value) {
+ this.ip_address = value;
+ }
/**
* 瀛愮綉鎺╃爜
+ *
* @return
*/
- public String getNetmask() { return netmask; }
+ public String getNetmask() {
+ return netmask;
+ }
/**
* 瀛愮綉鎺╃爜
+ *
* @param value
*/
- public void setNetmask(String value) { this.netmask = value; }
+ public void setNetmask(String value) {
+ this.netmask = value;
+ }
/**
* 缃戝叧IP
+ *
* @return
*/
- public String getIPGateway() { return ip_gateway; }
+ public String getIPGateway() {
+ return ip_gateway;
+ }
/**
* 缃戝叧IP
+ *
* @param value
*/
- public void setIPGateway(String value) { this.ip_gateway = value; }
+ public void setIPGateway(String value) {
+ this.ip_gateway = value;
+ }
/**
* DNS1
+ *
* @return
*/
- public String getDns1() { return dns1; }
+ public String getDns1() {
+ return dns1;
+ }
/**
* DNS1
+ *
* @param value
*/
- public void setDns1(String value) { this.dns1 = value; }
+ public void setDns1(String value) {
+ this.dns1 = value;
+ }
/**
* DNS2
+ *
* @return
*/
- public String getDns2() { return dns2; }
+ public String getDns2() {
+ return dns2;
+ }
/**
* DNS2
+ *
* @param value
*/
- public void setDns2(String value) { this.dns2 = value; }
+ public void setDns2(String value) {
+ this.dns2 = value;
+ }
- public VersionBean[] getVersions() {return null; }
- public void setVersions(VersionBean[] value) { }
+ public VersionBean[] getVersions() {
+ return null;
+ }
+
+ public void setVersions(VersionBean[] value) {
+ }
/**
* 缃戝叧绫诲瀷
+ *
* @return
*/
public String getGateway_type() {
@@ -250,6 +477,7 @@
/**
* 缃戝叧绫诲瀷
+ *
* @param gateway_type
*/
public void setGateway_type(String gateway_type) {
@@ -258,6 +486,7 @@
/**
* 纭欢鐗堟湰
+ *
* @return
*/
public String getHw_version() {
@@ -265,7 +494,8 @@
}
/**
- *纭欢鐗堟湰
+ * 纭欢鐗堟湰
+ *
* @param
*/
public void setHw_version(String hw_version) {
@@ -275,6 +505,7 @@
/**
* 鍥轰欢鐗堟湰
+ *
* @return
*/
public String getFw_version() {
@@ -283,6 +514,7 @@
/**
* 鍥轰欢鐗堟湰
+ *
* @param fw_version
*/
public void setFw_version(String fw_version) {
@@ -290,7 +522,7 @@
}
}
- public static class VersionBean implements Serializable{
+ public static class VersionBean implements Serializable {
private String module;
private String version;
--
Gitblit v1.8.0