- discard(废弃)
- demo(模板-参考示例)
- usmile-wx(微信)
- uc(用户统一中心)
- user-web(健康&设备&我的)
- bff-cloud
- iot-sevice(IOT平台)
- cloud-admin(运营后台)
根据版本号(毫秒时间戳)获取相应的设备绑定信息列表
POST
https://test.myusmile.online/user/device/getAccountDeviceListByUpdateTimestamp/v2
返回:List,即比传入updateTimestamp更新的时间戳列表
后台逻辑:
从 app_account_device 表中,查找该user的设备绑定关系中,updateTimestamp字段大于传入 updateTimestamp 的 updateTimestamp列表,作为一个Long数组返回客户端
-- getNewerTimestampList
SELECT distinct update_timestamp FROM app_account_device WHERE meb_id = 1722911974266699777 AND update_timestamp > 0;
-- getAccountDeviceListByUpdateTimestamp
select * from app_account_device WHERE meb_id = 1722911974266699777 AND update_timestamp = 1700044641096;
select * from app_account_device WHERE meb_id = 1722911974266699777 AND update_timestamp in(1700044641096,1700122523691,1700119754369,1699870524575,1700106257375,1700123529199,1700118000946,1700117843935,1700115957336,1700120810732) and status
=0;
请求参数
Header 参数
TOK
string
可选
默认值:
{{token}}
Body 参数application/json
updateTimestamp
integer
请求的版本号
userId
string
用户id
startTime
string
起始时间
endTime
string
结束时间
pageNo
integer
页码,默认值1
pageSize
integer
每页数量,默认值10
示例
{
"updateTimestamp": 1695191073699,
"userId": "{{accountId}}"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test.myusmile.online/user/device/getAccountDeviceListByUpdateTimestamp/v2' \
--header 'TOK: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"updateTimestamp": 1695191073699,
"userId": ""
}'
返回响应
🟢200成功
application/json
Body
flag
boolean
必需
code
integer
必需
message
string
必需
data
array [object]
可选
desc
string
可选
示例
{
"flag": true,
"code": 20000,
"message": "查询成功",
"data": [
{
"id": 103006,
"updateTimestamp": 1695191073699,
"createTimestamp": 1695124512,
"mebId": "1701847139726852097",
"modelId": 90,
"deviceId": "d9:5c:0e:38:39:f9",
"deviceNickname": "95C",
"originName": "F10P-D95C",
"status": 0,
"brushheadResetTime": 1695190507,
"createTime": "2023-09-19 19:55:12",
"updateTime": "2023-09-20 14:24:33"
}
]
}