Note: Except for login, all interfaces need to add token = login ciphertext in the request header
Return format:
{
"msg": "操作成功",
"code": 0,
"data": {
"loginServer": true, //是否登录了服务器, 如果为flase 并且initType=2 ,则需要进入登录服务器的界面
"initType": 2 //0未选择类型转跳到单机版, 联网版本选择
},
"success": true
}
Initial version
POST: /api/admin/initType
Request parameters: x-www-form-urlencoded
Parameter names
|
Type
|
Remarks
|
initType
|
Int
|
1 stand-alone version,
2 Network version
|
|
|
|
|
|
|
Register with the service
POST: /api/admin/loginServer
Request parameters: application/json
Parameter names
|
Type
|
Remarks
|
devName
|
String
|
Device name
|
loginName
|
String
|
Service Login Account
|
|
|
|
Back to:
{
"msg": "操作成功",
"code": 0,
"success": true
}
Tip: The app will be restarted after success
Change the password
POST: /api/admin/changePassword
Request parameters: x-www-form-urlencoded
Parameter names
|
Type
|
Remarks
|
oldPassword
|
String
|
salt encryption to the old code MD5
|
newPassword
|
String
|
New password plaintext
(Tentatively 6 pure digits)
|
|
|
|
Back to:
{
"msg": "操作成功",
"code": 0,
"success": true
}
Language management
Query Language List
GET: /api/language/support
Back to format:
{
"msg": "操作成功",
"code": 0,
"data": {
"defLanguage": "zh_CN",
"enable": true,
"languageLists": [
{
"language": "zh_CN",
"remark": "中文简体",
"tabField": "zhCn"
},
{
"language": "zh_HK",
"remark": "中文繁体",
"tabField": "zhHk"
},
{
"language": "en_US",
"remark": "English",
"tabField": "enUs"
},
{
"language": "ja_JP",
"remark": "日本語",
"tabField": "jaJp"
},
{
"language": "ko_KR",
"remark": "한국어",
"tabField": "koKr"
}
]
},
"success": true
}
Query Language List
GET: /api/language/list
Parameter names
|
Type
|
Remarks
|
lang
|
String
|
传 language字段
|
|
|
|
|
|
|
Back to format:
{
"msg": "操作成功",
"code": 0,
"data": [
{
"remark": "システム言語",
"source": "系统语言"
},
{
"remark": "メインキーID",
"source": "主键ID"
}
],
"success": true
}
List of users
POST: /api/devUser/listData
Request parameters: application/json
Parameter names
|
Type
|
Remarks
|
userName
|
String
|
搜索输入内容
|
|
|
|
|
|
|
Header
Parameter names
|
Type
|
Remarks
|
pageNum
|
int
|
分页页码, 默认传1
|
pageSize
|
Int
|
一页多少条, 默认传30
|
|
|
|
If have data, back to:
{
"msg": "操作成功",
"code": 0,
"data": {
"data": [
{
"deptId": 101,
"faceEnable": 1,
"faceToken": "q6pdhiaEohhMpqD3F5jGBg==",
"faceUrl": "https://app.yecon-tech.com/api/download/L3Byb2ZpbGUvdXBsb2FkLzIwMjAvMTIvMTYvZmEzNTVhZTUtNzg3Mi00NjIyLTlmNjQtOTZhZmVkMmE5ZmM5LmpwZw%3D%3D",
"id": 234,
"sex": 0,
"userCode": "gfff",
"userName": "xzff",
"userPhone": "1245"
}
],
"pageNum": 1,
"pageSize": 30,
"total": 1
},
"success": true
}
Note: FaceURL needs to determine if it starts with HTTP, it is a remote avatar, otherwise it is a base64 image
If no data, back to :
{
"msg": "操作成功",
"code": 0,
"data": {
"pageNum": 1,
"pageSize": 30,
"total": 0
},
"success": true
}
POST: /api/devUser/add
Request parameters: application/json
Parameter names
|
Type
|
Remarks
|
userName
|
String
|
User name
|
userCode
|
String
|
User number
|
userPhone
|
String
|
Tele number
|
faceUrl
|
String
|
Image Base64 string
|
sex
|
Int
|
0=male, 1=female
|
|
|
|
Back to:
{
"msg": "操作成功",
"code": 0,
"success": true
}
Modify the user
POST: /api/devUser/saveEdit
Request parameters: application/json
Parameter names
|
Type
|
Remarks
|
id
|
long
|
User ID
|
userName
|
String
|
User name
|
userCode
|
String
|
User number
|
userPhone
|
String
|
Tele number
|
faceUrl
|
String
|
Image Base64 string
|
sex
|
Int
|
0=male, 1=female
|
faceToken
|
String
|
User list returned
|
faceEnable
|
Int
|
User list returned
|
|
|
|
Note: If you do not modify the avatar faceUrl = null, do not submit the faceUrl field
Back to:
{
"msg": "操作成功",
"code": 0,
"success": true
}
Delete user
POST: /api/devUser/delete
Request parameters: x-www-form-urlencoded
Parameter names
|
Type
|
Remarks
|
Id
|
Long
|
User ID
|
|
|
|
Back to:
{
"msg": "操作成功",
"code": 0,
"success": true
}
4.5 User data export
POST:/api/devUser/export
Request parameters:
Parameter names
|
Type
|
Remarks
|
/
|
/
|
/
|
Back to: Will directly return a user.zip compressed file.
Pass record
POST: /api/currentRecord/listData
Request parameters: application/json
Parameter names
|
Type
|
Remarks
|
userCode
|
String
|
Search and enter the user number
|
startTime
|
String
|
yyyy-MM-dd
|
endTime
|
String
|
yyyy-MM-dd
|
|
|
|
Tip: The starting time is the last 7 days by default
Header
Parameter names
|
Type
|
Remarks
|
pageNum
|
int
|
Pagination page number, default is 1
|
pageSize
|
Int
|
How many entries per page, default 30
|
|
|
|
Back to:
{
"msg": "操作成功",
"code": 0,
"data": {
"data": [
{
"createTime": "2020-12-17 08:59:44",
"devSn": "YGKJ20204202773",
"devUserId": 234,
"faceImageBase64": "通行记录图片Base64 此处省略",
"faceToken": "q6pdhiaEohhMpqD3F5jGBg==",
"id": 9,
"temp": "36.6", //注意如果没有开启测温, 此字段可能为空
"uploadStatus": 1,
"userName": "xzff"
}
],
"pageNum": 1, //当前第几页
"pageSize": 30, //一页多少条
"total": 9 //总记录数
},
"success": true
}
POST: /api/currentRecord/delete
Request parameters: x-www-form-urlencoded
Parameter names
|
Type
|
Remarks
|
Id
|
Long
|
Access record ID
|
|
|
|
Back to:
{
"msg": "操作成功",
"code": 0,
"success": true
}
Clear the pass record
POST: /api/currentRecord/deleteAll
Parameter names
|
Type
|
Remarks
|
/
|
/
|
/
|
|
|
|
Back to:
{
"msg": "操作成功",
"code": 0,
"success": true
}
5.4 Exporting Traffic Records
POST: /api/currentRecord/listData
Request parameters:: application/json
Parameter names
|
Type
|
Remarks
|
userCode
|
String
|
Search enter user number
|
startTime
|
String
|
yyyy-MM-dd
|
endTime
|
String
|
yyyy-MM-dd
|
Note: The start time is the latest 7 days by default
Returns: a list. Zip compressed file stream is returned directly.
Do'stlaringiz bilan baham: |