# HoneyBox API 剩余迁移接口测试文件
# 用于验证 api-migration-remaining spec 中迁移的所有接口
# 最终验证: 54个接口迁移完成

@baseUrl = http://localhost:5238/api
@contentType = application/json

# 测试用Token（用户ID: 21583），有效期至2026年
@authToken = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoi5b6u5L-h55So5oi3MTMxMCIsImV4cCI6MTc2NzQzMTM1OCwidWlkIjoiMzMyMjY2IiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZWlkZW50aWZpZXIiOiIyMTU4MyIsImF1ZCI6IkhvbmV5Qm94VXNlcnMiLCJpc3MiOiJIb25leUJveCJ9.700XWIUmzEumNk5tNYRshh7M42A8MG1X4yTHuz9PZbc

### ============================================
### 1. 地址模块 (AddressController) - 7个接口
### Requirements: 1.1-1.7
### ============================================

### 1.1 添加收货地址
POST {{baseUrl}}/addAddress
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "receiver_name": "测试用户",
    "receiver_phone": "13800138000",
    "detailed_address": "北京市朝阳区测试地址"
}

### 1.2 获取地址列表
GET {{baseUrl}}/getAddressList
Authorization: Bearer {{authToken}}

### 1.3 获取默认地址
GET {{baseUrl}}/getDefaultAddress
Authorization: Bearer {{authToken}}

### 1.4 获取地址详情
GET {{baseUrl}}/getAddressDetail?id=1
Authorization: Bearer {{authToken}}

### 1.5 更新地址
POST {{baseUrl}}/updateAddress
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "id": 1,
    "receiver_name": "更新用户",
    "receiver_phone": "13900139000",
    "detailed_address": "上海市浦东新区测试地址"
}


### 1.6 设置默认地址
POST {{baseUrl}}/setDefaultAddress
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "id": 1
}

### 1.7 删除地址
POST {{baseUrl}}/deleteAddress
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "id": 1
}

### ============================================
### 2. 签到模块 (SignController) - 3个接口
### Requirements: 3.1-3.3
### ============================================

### 2.1 获取签到信息
GET {{baseUrl}}/sign_info
Authorization: Bearer {{authToken}}

### 2.2 执行签到
POST {{baseUrl}}/sign
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

### 2.3 执行签到(旧版兼容)
POST {{baseUrl}}/sign_add
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

### ============================================
### 3. 支付模块 (PayController) - 6个接口
### Requirements: 2.1-2.6
### ============================================

### 3.1 微信支付
POST {{baseUrl}}/wx_pay
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "order_no": "TEST_ORDER_001",
    "amount": 10.00,
    "body": "测试商品",
    "attach": "order_yfs"
}

### 3.2 余额支付
POST {{baseUrl}}/balance_pay
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "order_num": "TEST_ORDER_001",
    "amount": 10.00
}

### 3.3 充值
POST {{baseUrl}}/recharge
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "money": 100.00
}

### 3.4 获取充值配置
GET {{baseUrl}}/recharge_config

### 3.5 创建充值订单
POST {{baseUrl}}/create_recharge_order
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "money": 100.00
}

### 3.6 查询支付状态
GET {{baseUrl}}/query_pay_status?order_num=TEST_ORDER_001
Authorization: Bearer {{authToken}}


### ============================================
### 4. 福利屋模块 (WelfareController) - 2个接口
### Requirements: 4.1-4.2
### ============================================

### 4.1 获取福利屋列表
GET {{baseUrl}}/fuliwu?type=1&page=1

### 4.2 福利屋购买
POST {{baseUrl}}/fuliwu_buy
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {{authToken}}

goods_id=1&num=1

### ============================================
### 5. 商品详情模块 (GoodsController) - 5个接口
### Requirements: 5.1-5.5
### ============================================

### 5.1 无限赏商品详情
POST {{baseUrl}}/infinite_goodsdetail
Content-Type: {{contentType}}

{
    "goods_id": 1
}

### 5.2 一番赏商品详情(POST)
POST {{baseUrl}}/goodsdetail
Content-Type: {{contentType}}

{
    "goods_id": 1,
    "prize_num": 1
}

### 5.3 连击赏商品详情
POST {{baseUrl}}/infinite_goodsdetail2
Content-Type: {{contentType}}

{
    "goods_id": 1
}

### 5.4 一番赏中奖记录
POST {{baseUrl}}/shang_log
Content-Type: {{contentType}}

{
    "goods_id": 1,
    "prize_num": 1,
    "page": 1
}

### 5.5 领主王数据
GET {{baseUrl}}/ling_zhu_king?goods_id=1


### ============================================
### 6. 订单模块扩展 (OrderController) - 9个接口
### Requirements: 6.1-6.9
### ============================================

### 6.1 获取订单状态
GET {{baseUrl}}/get_order_status?order_num=TEST_ORDER_001
Authorization: Bearer {{authToken}}

### 6.2 获取订单列表
GET {{baseUrl}}/get_order_list?page=1&page_size=10
Authorization: Bearer {{authToken}}

### 6.3 创建网页支付订单
POST {{baseUrl}}/create_web_pay_order
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "goods_id": 1,
    "num": 1
}

### 6.4 获取订单链接
POST {{baseUrl}}/get_order_url_link
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "order_num": "TEST_ORDER_001"
}

### 6.5 商城下单
POST {{baseUrl}}/mall_orderbuy
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "goods_id": 1,
    "num": 1
}

### 6.6 一番赏抽奖结果
GET {{baseUrl}}/prize_order_log?order_num=TEST_ORDER_001
Authorization: Bearer {{authToken}}

### 6.7 道具卡列表
GET {{baseUrl}}/item_card_list
Authorization: Bearer {{authToken}}

### 6.8 连击赏秘宝下单
POST {{baseUrl}}/infinite_mibao_orderbuy
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "goods_id": 1
}

### 6.9 测试接口
POST {{baseUrl}}/get_user_test
Content-Type: {{contentType}}

{
    "user_id": 1
}


### ============================================
### 7. 优惠券模块扩展 (CouponController) - 5个接口
### Requirements: 7.1-7.5
### ============================================

### 7.1 批量领取优惠券
POST {{baseUrl}}/receive
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "coupon_ids": "1,2,3"
}

### 7.2 可领取优惠券列表
GET {{baseUrl}}/coupon
Authorization: Bearer {{authToken}}

### 7.3 可使用优惠券列表
GET {{baseUrl}}/used?goods_id=1
Authorization: Bearer {{authToken}}

### 7.4 领券中心列表
POST {{baseUrl}}/t_coupon_list
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "page": 1
}

### 7.5 领券中心领取
POST {{baseUrl}}/t_coupon_ling
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "coupon_id": 1
}

### ============================================
### 8. 用户权益模块 (UserController) - 2个接口
### Requirements: 8.1-8.2
### ============================================

### 8.1 获取权益信息
GET {{baseUrl}}/quan_yi
Authorization: Bearer {{authToken}}

### 8.2 领取权益奖励
POST {{baseUrl}}/quan_yi_ling
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "reward_id": 1
}


### ============================================
### 9. 收藏模块扩展 (CollectionController) - 3个接口
### Requirements: 9.1-9.3
### ============================================

### 9.1 收藏列表
GET {{baseUrl}}/collect_list?page=1&pageSize=10
Authorization: Bearer {{authToken}}

### 9.2 取消收藏
POST {{baseUrl}}/cancelCollect
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "goods_id": 1
}

### 9.3 收藏状态
GET {{baseUrl}}/collect_status?goods_id=1
Authorization: Bearer {{authToken}}

### ============================================
### 10. 排行榜模块扩展 (RankController) - 2个接口
### Requirements: 10.1-10.2
### ============================================

### 10.1 排行榜列表
GET {{baseUrl}}/getRankList?type=diamond&page=1&limit=10

### 10.2 中奖记录排行榜
GET {{baseUrl}}/record?page=1

### ============================================
### 11. 兑换码模块 (RedeemController) - 2个接口
### Requirements: 11.1-11.2
### ============================================

### 11.1 使用兑换码
POST {{baseUrl}}/redeem_code
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "code": "TEST_CODE_001"
}

### 11.2 兑换记录
GET {{baseUrl}}/redeem_record?page=1&pageSize=10
Authorization: Bearer {{authToken}}


### ============================================
### 12. 仓库保险柜模块 (WarehouseController) - 2个接口
### Requirements: 12.1-12.2
### ============================================

### 12.1 移入保险柜
POST {{baseUrl}}/warehouse_movein
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "recovery_info": "1,2,3"
}

### 12.2 移出保险柜
POST {{baseUrl}}/warehouse_remove
Content-Type: {{contentType}}
Authorization: Bearer {{authToken}}

{
    "recovery_info": "1,2,3"
}

### ============================================
### 13. 认证模块扩展 (AuthController) - 1个接口
### Requirements: 13.1
### ============================================

### 13.1 H5绑定手机号
POST {{baseUrl}}/login_bind_mobile_h5
Content-Type: {{contentType}}

{
    "mobile": "13800138000",
    "code": "123456"
}

### ============================================
### 14. 配置模块扩展 (ConfigController) - 1个接口
### Requirements: 14.1
### ============================================

### 14.1 单页内容(POST)
POST {{baseUrl}}/danye
Content-Type: {{contentType}}

{
    "type": "rule"
}

### ============================================
### 15. 商城模块 (MallController) - 3个接口
### Requirements: 15.1-15.3
### ============================================

### 15.1 钻石商品列表
GET {{baseUrl}}/get_diamond_list

### 15.2 创建钻石订单
GET {{baseUrl}}/createOrderProducts?product_id=1&pay_type=2
Authorization: Bearer {{authToken}}

### 15.3 钻石订单状态
GET {{baseUrl}}/get_diamond_order_log?order_num=TEST_ORDER_001
Authorization: Bearer {{authToken}}

### ============================================
### 测试说明
### ============================================
# 
# 本文件包含 api-migration-remaining spec 中迁移的所有54个接口
# 
# 运行测试前请确保:
# 1. API服务已启动 (dotnet run)
# 2. 数据库连接正常
# 3. 测试Token有效
#
# 迁移状态: 100% 完成
# 总接口数: 54个
# 已迁移: 54个
