You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
302 lines
9.7 KiB
302 lines
9.7 KiB
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "接口文档",
|
|
"title": "Swagger Example API",
|
|
"contact": {},
|
|
"version": "0.0.1"
|
|
},
|
|
"paths": {
|
|
"/terminal/pant": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"terminal"
|
|
],
|
|
"summary": "终端心跳上报",
|
|
"parameters": [
|
|
{
|
|
"description": "page,pageSize",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.TerminalPant"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/terminal/update": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"terminal"
|
|
],
|
|
"summary": "终端固件更新完成",
|
|
"parameters": [
|
|
{
|
|
"description": "page,pageSize",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.TerminalUpdateGet"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"terminal"
|
|
],
|
|
"summary": "终端获取最新固件更新",
|
|
"parameters": [
|
|
{
|
|
"description": "page,pageSize",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.TerminalUpdateGet"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/identify": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "比对特征码获取人员 id",
|
|
"parameters": [
|
|
{
|
|
"description": "page,pageSize",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserIdentify"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/register": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "用户注册",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "特征码` //特征码",
|
|
"name": "feature_code",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "报文唯一标识",
|
|
"name": "msg_id",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "时间戳` //时间戳",
|
|
"name": "time",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "用户id(或员工号)",
|
|
"name": "user_id",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"request.TerminalPant": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd": {
|
|
"description": "命令id 1020",
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"mode": {
|
|
"description": "当前是否属于降级模式:0:正常在线比对模式 1:降级模式(离线比对模式)",
|
|
"type": "integer"
|
|
},
|
|
"platform": {
|
|
"description": "闸机状态 0-在线 1-离线",
|
|
"type": "integer"
|
|
},
|
|
"turnstile": {
|
|
"description": "闸机标识",
|
|
"type": "string"
|
|
},
|
|
"ver": {
|
|
"description": "版本号",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"msg_id": {
|
|
"description": "消息id 报文唯一标识",
|
|
"type": "string"
|
|
},
|
|
"time": {
|
|
"description": "时间戳",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.TerminalUpdateGet": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd": {
|
|
"description": "命令id 1050",
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"description": "获取更新文件标识,值为1",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"msg_id": {
|
|
"description": "消息id 报文唯一标识",
|
|
"type": "string"
|
|
},
|
|
"time": {
|
|
"description": "时间戳",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UserIdentify": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd": {
|
|
"description": "1070",
|
|
"type": "string"
|
|
},
|
|
"feature_code": {
|
|
"description": "特征码",
|
|
"type": "string"
|
|
},
|
|
"msg_id": {
|
|
"description": "报文唯一标识",
|
|
"type": "string"
|
|
},
|
|
"time": {
|
|
"description": "时间戳",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"ApiKeyAuth": {
|
|
"type": "apiKey",
|
|
"name": "x-token",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}
|