Appearance
Query Orders
API Information
- Request Path:
/market/order/page/query - Request Method:
POST - Content-Type:
application/json
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | User authentication token |
| Content-Type | String | Yes | Must be set to application/json |
Request Body Structure
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| orderNo | String | No | Order number | - |
| orderTimeStart | Long | No | Start time filter | - |
| orderTimeEnd | Long | No | End time filter | - |
| statuses | List<Integer> | No | Order statuses (1-Pending, 2-Delivered, 3-Completed, 4-Analyzing, 5-Pending Image, 6-Failed) | - |
| type | Integer | No | Order type (1-Normal, 2-Programming) | - |
| creator | String | No | Creator ID | Injected by token usually |
| pageNumber | int | Yes | Page number | - |
| pageSize | int | Yes | Page size | - |
| sort | String | No | Sort field | - |
| order | String | No | Sort order (asc/desc) | - |
Request Body Example
json
{
"pageNumber": 1,
"pageSize": 10,
"statuses": [1, 2],
"type": 1
}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | OrderQueryResp | Response data |
OrderQueryResp Object
| Field | Type | Description |
|---|---|---|
| total | Long | Total count |
| content | List<MarketOrder> | Order list |
MarketOrder Object
| Field | Type | Description |
|---|---|---|
| id | Long | Order ID |
| orderNo | String | Order Number |
| totalAmount | BigDecimal | Total Amount |
| discountAmount | BigDecimal | Discount Amount |
| finalAmount | BigDecimal | Final Amount |
| thumb | String | Thumbnail URL |
| status | Integer | Order Status |
| type | Integer | Order Type (1-Normal, 2-Programming) |
| provider | String | Provider (changguang/tianyi) |
| region | String | Region (Geometry WKT) |
| timeStart | String | Start Time |
| timeEnd | String | End Time |
| simulationId | String | Simulation ID |
| recurring | Boolean | Is Recurring Order |
| recurringDay | Integer | Recurring Day |
| recurringUnit | Integer | Recurring Unit (1-Day, 2-Week, 3-Month) |
| maxCloud | Integer | Max Cloud Cover (0-100) |
| resolution | BigDecimal | Ground Resolution (m) |
| creator | String | Creator ID |
| ctime | Long | Create Time |
| mtime | Long | Modify Time |
| deleted | Integer | Deleted Flag |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": {
"total": 50,
"content": [
{
"id": 1,
"orderNo": "ORDER_001",
"totalAmount": 1000.0,
"discountAmount": 100.0,
"finalAmount": 900.0,
"thumb": "http://example.com/thumb.jpg",
"status": 1,
"type": 1,
"provider": "tianyi",
"region": "{\"type\":\"Polygon\",\"coordinates\":[[[102.61282157031928,21.488503948497097],[106.99114976403081,21.488503948497097],[106.99114976403081,18.594746845159506],[102.61282157031928,18.594746845159506],[102.61282157031928,21.488503948497097]]]}",
"timeStart": "2023-10-27 10:00:00",
"timeEnd": "2023-10-28 10:00:00",
"recurring": false,
"maxCloud": 20,
"resolution": 0.5,
"creator": "user_123",
"ctime": 1698364800000,
"mtime": 1698364800000,
"deleted": 0
}
]
}
}Failure Response
json
{
"code": 400,
"message": "Invalid page number",
"data": null
}Error Code Description
| Error Code | Description |
|---|---|
| 200 | Success |
| 400 | Request parameter error |
| 401 | Unauthorized |
| 500 | Server internal error |
Usage Instructions
- This API is used to query orders with pagination
- User authentication is required
- Supports filtering by status, type, and time
Notes
- Default sort is by create time desc