feat(work): 新增硬件云端接入相关接口

This commit is contained in:
fudiwei
2022-12-04 02:12:14 +08:00
parent e2a26fcc01
commit a61c8e5964
65 changed files with 1559 additions and 14 deletions

View File

@@ -0,0 +1,7 @@
{
"errcode": 0,
"errmsg": "ok",
"device_secret": "ddddddd",
"device_access_token": "xxxxxx",
"expires_in": 7200
}

View File

@@ -0,0 +1,4 @@
{
"device_sn": "SN1",
"device_secret": "ldAE_H9anCRN21GKXVfdAAAAAAAAAAAAAAAAAA"
}

View File

@@ -0,0 +1,6 @@
{
"errcode": 0,
"errmsg": "ok",
"device_access_token": "61W3mEpU66027wgNZ_MhGHNQDHnFATkDa9-2llMBjUwxRSNPbVsMmyD-yq8wZETSoE5NQgecigDrSHkPtIYA",
"expires_in": 7200
}

View File

@@ -0,0 +1,5 @@
{
"model_id": "mdddddccc7775555aaa",
"model_secret": "ldAE_H9anCRN21GKXVfdAAAAAAAAAAAAAAAAAA",
"model_ticket": "Cfp0_givEagXcYJIztF6sfbdmIZCmpaR8ZBsvJEFFNBrWmnD5-CGYJ3_NhYexMyw"
}

View File

@@ -0,0 +1,6 @@
{
"errcode": 0,
"errmsg": "ok",
"model_access_token": "61W3mEpU66027wgNZ_MhGHNQDHnFATkDa9-2llMBjUwxRSNPbVsMmyD-yq8wZETSoE5NQgecigDrSHkPtIYA",
"expires_in": 7200
}

View File

@@ -0,0 +1,15 @@
{
"errcode": 0,
"errmsg": "ok",
"device_detail": {
"model_name": "device_model",
"default_name": "默认名",
"qr_code": "https://open.work.weixin.qq.com/connect/hardware?hw_code=lS5***********",
"bind_status": 1,
"bind_corpinfo": {
"open_corpid": "wpTD_dsdfsdfsdfsdfs1w",
"corp_name": "测试企业"
},
"remark_name": "小区大门"
}
}

View File

@@ -0,0 +1,6 @@
{
"user_item": [
{ "open_userid": "张三", "user_type": 0 },
{ "open_userid": "李四", "user_type": 2 }
]
}

View File

@@ -0,0 +1,27 @@
{
"errcode": 0,
"errmsg": "ok",
"userinfo": {
"useritems": [
{
"open_userid": "ww***********",
"user_name": "张三",
"user_type": 1,
"pass_rule": {
"rule_list": [
{
"id": 0,
"rule": "9:00-10:00 * * 1-5 *",
"effect_time": 1542874137
},
{
"id": 1,
"rule": "9:30-10:00 * * 6 *",
"effect_time": 1542874137
}
]
}
}
]
}
}

View File

@@ -0,0 +1,5 @@
{
"cursor": "CURSOR",
"limit": 100,
"only_perm_version": false
}

View File

@@ -0,0 +1,29 @@
{
"errcode": 0,
"errmsg": "ok",
"next_cursor": "xxxx",
"perm_version": 5,
"userinfo": {
"useritems": [
{
"open_userid": "ww***********",
"user_name": "张三",
"user_type": 1,
"pass_rule": {
"rule_list": [
{
"id": 0,
"rule": "9:00-10:00 * * 1-5 *",
"effect_time": 1542874137
},
{
"id": 1,
"rule": "9:30-10:00 * * 6 *",
"effect_time": 1542874137
}
]
}
}
]
}
}

View File

@@ -0,0 +1,5 @@
{
"oper_id": "OPER_ID",
"errcode": 1,
"errmsg": "设备离线"
}

View File

@@ -0,0 +1,6 @@
{
"online_status": 1,
"cur_version": "CURRENT_FIRMWARE",
"upgradable_version": "UPGRADEABLE_CURRENT_FIRMWARE",
"upgradable_version_desc": "重大升级"
}

View File

@@ -0,0 +1,6 @@
{
"oper_id": "OPER_ID",
"errcode": 1,
"errmsg": "设备离线",
"cur_version": "CUR_VERSION"
}

View File

@@ -0,0 +1,6 @@
{
"oper_id": "OPER_ID",
"type": "remote_open_door",
"errcode": 2,
"errmsg": "设备离线"
}

View File

@@ -0,0 +1,18 @@
{
"access_data": [
{
"open_userid": "x1",
"user_type": 0,
"timestamp": 12345,
"pass_type": 1,
"pass_method": 1
},
{
"open_userid": "x2",
"user_type": 0,
"timestamp": 12345,
"pass_type": 1,
"pass_method": 1
}
]
}

View File

@@ -0,0 +1,11 @@
{
"errcode": 0,
"errmsg": "ok",
"fail_list": [
{
"open_userid": "x2",
"user_type": 0,
"timestamp": 12345
}
]
}

View File

@@ -0,0 +1,14 @@
{
"checkin_data": [
{
"open_userid": "x1",
"user_type": 0,
"timestamp": 12345
},
{
"open_userid": "x2",
"user_type": 0,
"timestamp": 12345
}
]
}

View File

@@ -0,0 +1,11 @@
{
"errcode": 0,
"errmsg": "ok",
"fail_list": [
{
"open_userid": "x2",
"user_type": 0,
"timestamp": 12345
}
]
}

View File

@@ -0,0 +1,11 @@
{
"temperature_data": [
{
"open_userid": "zhangsan",
"user_type": 2,
"temperature": "36.7",
"timestamp": 12345,
"status": 0
}
]
}

View File

@@ -0,0 +1,11 @@
{
"errcode": 0,
"errmsg": "ok",
"fail_list": [
{
"open_userid": "zhangsan",
"user_type": 2,
"timestamp": 12345
}
]
}

View File

@@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"qr_code": "https://open.work.weixin.qq.com/connect/hardware?hw_code=lS5***********"
}