-
用户类别 :
- 0 :学生用户
- 1 :教师用户
-
code :
- 0 : 一切正常
- 1 : 添加 message 字段展示错误
- 2 : 登陆失败
-
url : host + uri
- example :
- host : http://lib.nefu.edu.cn/api
- uri : /login
- url : http://lib.nefu.edu.cn/api/login
- example :
-
编号 :
- studentId : 学生学号
- index : 数据库主键id
- number : 书包柜编号
- location : 1_1 代表一楼区域1 1_2代表区域2
- POST /login
- payload :
{
"studentId" : "2016210111",
"userPassword" : "123456"
}
- return :
{
"code" : 0,
"data" : {
"token" : "dsfuihwi87yr8734riuew9",
"type" : "1"
}
}
-
GET /code
-
return :
{
"data" : "base64"
}
- POST /box-order
- location 为 null时,随机预约书包柜
- payload :
{
"location" : "1_1",
"studentId" : "2016210111",
"verifyCode" : "12ab"
}
- return :
{
"code" : 0,
"data" : true
}
-
GET /status?studentId=2016210111&verifyCode=2nghs2
-
cookie : 验证码回传的Jsession
-
return :
{
"code" : 0,
"data" : 100
}
-
GET /info/{studentId}
-
return :
{
"code" : 0,
"data" : {
"location" : "1_1",
"number" : "123"
}
}
-
GET /time
-
return :
{
"code" : 0,
"data" : {
"startTime" : "2018-10-10 18:00:00",
"nowTime" : "2018-10-10 15:00:00",
"endTime" : "2018-11-11 11:11:11"
}
}
-
GET /num/{floor}
-
return :
{
"code" : 0,
"data" :
[
{
"location" : "1_2",
"num" : 100
},
{
"location" : "1_3",
"num" : 100
}
]
}
-
GET /open-time
-
return :
{
"code" : 0,
"data" : {
"startTime" : "2018-10-10 12:00:00",
"endTime" : "2018-10-10 13:00:00"
}
}
- PUT /open-time
- payload :
- startTime 开始时间
- endTime 结束时间
{
"startTime" : "2018-10-10 12:00:00",
"endTime" : "2018-10-10 13:00:00"
}
- return :
{
"code" : 0,
"data" : true
}
-
GET /open-area?floor=1
-
return :
{
"code": 0,
"data":
[
{
"configKey" : "1_4",
"configValue" : "1",
"systemId" : "1"
},
{
"configKey" : "1_4",
"configValue" : "1",
"systemId" : "2"
},
{
"configKey": "1_3",
"configValue": "1",
"systemId": "3"
},
{
"configKey": "1_2",
"configValue": "0",
"systemId": "4"
}
]
}
- PUT /open-area
- payload :
- status : 0代表关闭,1代表开放
{
"locationList":["1_1","1_2"],
"status" : 1
}
- return :
{
"code" : 0
}
-
GET /area-status/?studentId=2016224283&floor=1
- 1 表示可以预约 | 0 表示不可预约
- data 中的长度代表这一楼层中区域的数量,分别对应1_1,1_2...
-
return:
{
"code" : 0,
"data" : [
{
"location" : "1_1",
"status" : 0
},
{
"location" : "1_2",
"status" : 1
},
{
"location" : "1_3",
"status" : 0
}
]
}
-
GET /detail?location=1_1&status=0&number=10-11&systemIdLeft=1&systemIdRight=10&studentId=2016224283&page=1
-
默认page=1, status=0 查询开放柜子 || status=1 查询被占用柜子 || status=2 查询预留柜子
-
number代表书包柜的编号(与location一块查询 例如location=1_1&number=3-20)
-
location 2_代表2楼所有区域
-
SystemIdLeft 代表systemId的左边界
-
SystemIdRight 右边界
-
return :
- perPage 每页显示条数
{
"code" : 0,
"data" : {
"ships" :
[
{
"location" : "1_1",
"number" : 123,
"systemId" : 145,
"status" : 0,
"studentId" : "123",
"studentName": "pc"
},
{
"location" : "1_1",
"number" : 123,
"systemId" : 140,
"status" : 0,
"studentId" : "123",
"studentName": "ss"
}
],
"pages" : {
"totalPage" : 15,
"nowPage" : 10,
"perPage" : 10,
"totalSize" : 85
}
}
}
- DELETE /ship
- payload :
- data 不为空时表示删除数组内柜子的关系, 为空时表示清空所有关系,数组成员为systemId
[123, 234, 345]
- return :
{
"code" : 0
}
- PUT /ship
- payload :
- systemId : 书包柜systemId
- stuId : 为 null 则释放关系, 为学号则建立关系
{
"systemId" : 189,
"studentId" : "1234555"
}
- return :
{
"code" : 0
}
- POST /reserved-id
- payload :
- array : 代表预留柜子的id的数组
{
"array" : [1,2,3]
}
- return :
{
"code" : 0,
"data": true
}
- POST /reserved-number
- payload :
- start : 代表预留柜子开始的number
- end : 代表预留柜子结束时的number
{
"floor" : 1,
"area" : 2,
"start" : 1,
"end" : 3
}
- return :
{
"code" : 0,
"data": true
}
- POST /bookcase-systemId
{
"systemIdLeft" : 1,
"systemIdRight" : 10
}
- return :
{
"code" : 0,
"data": true
}
- POST /bookcase
- payload :
{
"floor" : 1,
"area" : 1,
"total" : 100
}
- return :
{
"code" : 0
}
- DELETE /bookcase-id
- payload :
- array : 代表删除柜子的id的数组
{
"array" : [1,2,3]
}
- return :
{
"code" : 0,
"data": true
}
- DELETE /bookcase-systemId
{
"systemIdLeft" : 1,
"systemIdRight" : 10
}
- return :
{
"code" : 0,
"data": true
}
- DELETE /bookcase-number
- payload :
- start : 代表删除柜子开始的num
- end : 代表删除柜子结束时的num
{
"floor" : 1,
"area" : 2,
"start" : 1,
"end" : 3
}
- return :
{
"code" : 0,
"data": true
}
- POST /location
- payload :
- floor : 楼层
- status : 0 不可预约 | 1 可预约
{
"floor":1,
"status":0
}
- return :
{
"code" : 0,
"data" : true
}
-
DELETE /location/{location}
-
return :
{
"code" : 0,
"data" : true
}
- POST /list
- payload :
{
"studentId" : "12434555434"
}
- return :
{
"code" : 0
}
-
DELETE /list/{studentId}
-
return :
{
"code" : 0
}
-
GET /list
-
return :
{
"code" : 0,
"data" : [
{
"name" : "张三",
"studentId" : "1234556676"
},
{
"name" : "张三",
"studentId" : "1234556676"
}
]
}
- POST /student
- payload :
- Content-Type = multipart/form-data
- file = 2015.xlsx
- return :
{
"code" : 0,
"data" : true
}
- GET /downMessage
- DELETE /student
- return :
{
"code" : 0,
"data" : true
}