HaniBlindBox/server/HoneyBox/src/HoneyBox.Api/goods-system.http
2026-01-04 01:47:02 +08:00

463 lines
10 KiB
HTTP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# HoneyBox API
#
# Checkpoint 15:
@baseUrl = http://localhost:5238/api
@contentType = application/json
# TokenToken
# TokenID: 215832026
@authToken = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoi5b6u5L-h55So5oi3MTMxMCIsImV4cCI6MTc2NzQzMTM1OCwidWlkIjoiMzMyMjY2IiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZWlkZW50aWZpZXIiOiIyMTU4MyIsImF1ZCI6IkhvbmV5Qm94VXNlcnMiLCJpc3MiOiJIb25leUJveCJ9.700XWIUmzEumNk5tNYRshh7M42A8MG1X4yTHuz9PZbc
# IDID
@testGoodsId = 1
@testGoodsNum = 1
@testGoodsListId = 1
@testShangId = 1
### ============================================
### 1.
### ============================================
### 1.1 -
# GET /api/health
GET {{baseUrl}}/health
Accept: {{contentType}}
### ============================================
### 2. (GoodsController)
### Requirements: 1.1-1.6
### ============================================
### 2.1 -
# POST /api/goods_list
# Requirements: 1.1, 1.2
POST {{baseUrl}}/goods_list
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"type": -1,
"page": 1,
"pageSize": 15
}
### 2.2 - type=1
# POST /api/goods_list
# Requirements: 1.1
POST {{baseUrl}}/goods_list
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"type": 1,
"page": 1,
"pageSize": 15
}
### 2.3 - type=2
# POST /api/goods_list
# Requirements: 1.1
POST {{baseUrl}}/goods_list
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"type": 2,
"page": 1,
"pageSize": 15
}
### 2.4 -
# POST /api/goods_list
# Requirements: 1.1
POST {{baseUrl}}/goods_list
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"type": -1,
"page": 2,
"pageSize": 15
}
### ============================================
### 3. (GoodsController)
### Requirements: 2.1-2.7
### ============================================
### 3.1 -
# POST /api/goods_detail
# Requirements: 2.1, 2.2
POST {{baseUrl}}/goods_detail
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_num": 0
}
### 3.2 -
# POST /api/goods_detail
# Requirements: 2.1, 2.3-2.7
POST {{baseUrl}}/goods_detail
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_num": {{testGoodsNum}}
}
### ============================================
### 4. (GoodsController)
### Requirements: 3.1-3.3
### ============================================
### 4.1
# POST /api/goods_children
# Requirements: 3.1-3.3
POST {{baseUrl}}/goods_children
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_num": {{testGoodsNum}},
"goods_list_id": {{testGoodsListId}}
}
### ============================================
### 5. (GoodsController)
### Requirements: 4.1-4.3
### ============================================
### 5.1 -
# POST /api/goods_extend
# Requirements: 4.1-4.3
POST {{baseUrl}}/goods_extend
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_type": 1
}
### 5.2 -
# POST /api/goods_extend
# Requirements: 4.1-4.3
POST {{baseUrl}}/goods_extend
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_type": 2
}
### ============================================
### 6. (GoodsController)
### Requirements: 5.1-5.4
### ============================================
### 6.1
# POST /api/goods_num_list
# Requirements: 5.1
POST {{baseUrl}}/goods_num_list
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}}
}
### 6.2 -
# POST /api/goods_num_detail
# Requirements: 5.2-5.4
POST {{baseUrl}}/goods_num_detail
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"page_no": 0,
"sort": 0
}
### 6.3 -
# POST /api/goods_num_detail
# Requirements: 5.2-5.4
POST {{baseUrl}}/goods_num_detail
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"page_no": 0,
"sort": 1
}
### 6.4 -
# POST /api/goods_num_detail
# Requirements: 5.2-5.4
POST {{baseUrl}}/goods_num_detail
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"page_no": 0,
"sort": 2
}
### ============================================
### 7. (GoodsController)
### Requirements: 7.1-7.2
### ============================================
### 7.1
# POST /api/goods_prize_count
# Requirements: 7.1
POST {{baseUrl}}/goods_prize_count
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}}
}
### 7.2 -
# POST /api/goods_prize_content
# Requirements: 7.2
POST {{baseUrl}}/goods_prize_content
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"num": {{testGoodsNum}}
}
### 7.3 -
# POST /api/goods_prize_content
# Requirements: 7.2
POST {{baseUrl}}/goods_prize_content
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"num": 0
}
### ============================================
### 8. (GoodsController)
### Requirements: 8.1-8.4
### ============================================
### 8.1 -
# POST /api/goods_prize_logs
# Requirements: 8.1, 8.3
POST {{baseUrl}}/goods_prize_logs
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_num": {{testGoodsNum}},
"shang_id": 0,
"page": 1,
"pageSize": 15
}
### 8.2 -
# POST /api/goods_prize_logs
# Requirements: 8.1, 8.2
POST {{baseUrl}}/goods_prize_logs
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_num": {{testGoodsNum}},
"shang_id": {{testShangId}},
"page": 1,
"pageSize": 15
}
### ============================================
### 9. (CollectionController)
### Requirements: 6.1-6.4
### ============================================
### 9.1 /
# POST /api/addCollect
# Requirements: 6.1-6.3
POST {{baseUrl}}/addCollect
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_num": {{testGoodsNum}}
}
### 9.2 -
# POST /api/listCollect
# Requirements: 6.4
POST {{baseUrl}}/listCollect
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"type": -1,
"page": 1,
"pageSize": 100
}
### 9.3 -
# POST /api/listCollect
# Requirements: 6.4
POST {{baseUrl}}/listCollect
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"type": 1,
"page": 1,
"pageSize": 100
}
### 9.4
# POST /api/delCollect
# ID
POST {{baseUrl}}/delCollect
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"id": 1
}
### ============================================
### 10.
### ============================================
### 10.1 访 - Token
POST {{baseUrl}}/goods_list
Content-Type: {{contentType}}
{
"type": -1,
"page": 1,
"pageSize": 15
}
### 10.2 访 - Token
POST {{baseUrl}}/goods_detail
Content-Type: {{contentType}}
{
"goods_id": {{testGoodsId}},
"goods_num": 0
}
### 10.3 访 - Token
POST {{baseUrl}}/addCollect
Content-Type: {{contentType}}
{
"goods_id": {{testGoodsId}},
"goods_num": {{testGoodsNum}}
}
### 10.4 访 - Token
POST {{baseUrl}}/listCollect
Content-Type: {{contentType}}
{
"type": -1,
"page": 1,
"pageSize": 100
}
### 10.5 - ID
POST {{baseUrl}}/goods_detail
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{}
### 10.6 - ID0
POST {{baseUrl}}/goods_detail
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": 0,
"goods_num": 0
}
### 10.7 - ID
POST {{baseUrl}}/goods_children
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_num": {{testGoodsNum}},
"goods_list_id": {{testGoodsListId}}
}
### 10.8 - ID
POST {{baseUrl}}/goods_children
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_id": {{testGoodsId}},
"goods_num": {{testGoodsNum}}
}
### 10.9 - ID
POST {{baseUrl}}/goods_extend
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_type": 1
}
### 10.10 - ID
POST {{baseUrl}}/goods_num_list
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{}
### 10.11 - ID
POST {{baseUrl}}/goods_prize_count
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{}
### 10.12 - ID
POST {{baseUrl}}/addCollect
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{
"goods_num": {{testGoodsNum}}
}
### 10.13 - ID
POST {{baseUrl}}/delCollect
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}
{}