Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Uplay.exe
Binary file not shown.
193 changes: 0 additions & 193 deletions 机票预订系统接口文档.md

This file was deleted.

121 changes: 121 additions & 0 deletions 机票预订系统接口文档2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
机票预订系统接口文档
================

1. 用户端接口
-----------
- 新建用户

| 名称 | 键 | 值 |
| ------------- | ------------- | ----- |
//id在数据库里面自动生成,不需要传入的样子
|Name| |String|
|Password| |String|
|action| |String| |login|
``` JSON
{
   "Result": Int \\新建成功则返回用户的Id并客户端储存,失败返回0
   "Result_Info":String \\判断成功则返回“ok”,否则返回对应说明
}
```

- 用户登录

| 名称 | 键 | 值 |
| ------------- | ------------- | ----- |
|Name| |String|
|Password| |String|
|action|   |String|   |signup|

``` JSON
{
   "Result": Int \\登录成功则返回用户的Id并客户端储存,失败返回0
"Result_Info":String \\判断成功则返回“ok”,否则返回对应说明
}
```

- 用户查询机票信息

| 名称 | 键 | 值 |
| ------------- | ------------- | ----- |
| Depart_Time   | |String|
| Depart_Place     |       |String|
| Arrive_Place | |String|
| action | |String| |search_flight|

//出发时间是设置某天,然后显示当天有的机票

``` JSON
{
"result":
[
"order_id":Int
"user_name":String
"order_time":String
"flight_num":Int
"departure_time":String
"departure_location":String
"destination":String
"seat_num":Int
"bording_pass":String
"price":Int
]
}
```

- 用户预订机票

| 名称 | 键 | 值 |
| ------------- | ------------- | ----- |
|User_Id| |Int|
|Flight_Id| |Int|
|Seat_Type| |String|
|action| |String| |book|

``` JSON
{
   "Result":0/1   //预订结果为0时下面结果都是空字符串
   "Pickup_Time":String
"Pickup_Place":String
"Ticket_Id":Int
}
```

- 查询已经预订的机票

| 名称 | 键 | 值 |
| ------------- | ------------- | ----- |
|User_Id||Int|
|action| |String| |search_ticket|

``` JSON
{
"result":
[
"order_id":Int
"user_name":String
"order_time":String
"flight_num":Int
"departure_time":String
"departure_location":String
"destination":String
"seat_num":Int
"bording_pass":String
"price":Int
]
}
```

- 退订机票

| 名称 | 键 | 值 |
| ------------- | ------------- | ----- |
|User_Id| |String|
|Order_Id| |String|
|action| |String| |delete|

``` JSON
{
"Result":0/1
}
```