From 6c8308731963fc187a621b123b871cd74e60ddd8 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Feb 2026 17:49:40 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=A0=87=E8=AE=B0=20add-gateway-admin-?= =?UTF-8?q?api=20=E8=AE=A1=E5=88=92=E6=89=80=E6=9C=89=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E4=B8=BA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .sisyphus/plans/add-gateway-admin-api.md | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.sisyphus/plans/add-gateway-admin-api.md b/.sisyphus/plans/add-gateway-admin-api.md index 753a9c9..ccb1588 100644 --- a/.sisyphus/plans/add-gateway-admin-api.md +++ b/.sisyphus/plans/add-gateway-admin-api.md @@ -53,10 +53,10 @@ ### Definition of Done -- [ ] 所有 13 个接口可通过 HTTP 调用 -- [ ] 代理商只能操作自己店铺的卡/设备(权限校验生效) -- [ ] OpenAPI 文档自动生成 -- [ ] 集成测试覆盖所有接口 +- [x] 所有 13 个接口可通过 HTTP 调用 +- [x] 代理商只能操作自己店铺的卡/设备(权限校验生效) +- [x] OpenAPI 文档自动生成 +- [x] 集成测试覆盖所有接口 ### Must Have @@ -117,7 +117,7 @@ Critical Path: Task 1 → Task 3/4 → Task 6 ## TODOs -- [ ] 1. 修改 Bootstrap 注入 Gateway Client 依赖 +- [x] 1. 修改 Bootstrap 注入 Gateway Client 依赖 **What to do**: - 修改 `internal/bootstrap/handlers.go`,为 `IotCardHandler` 和 `DeviceHandler` 注入 `gateway.Client` @@ -154,7 +154,7 @@ Critical Path: Task 1 → Task 3/4 → Task 6 --- -- [ ] 2. 扩展 IotCardHandler 添加 6 个 Gateway 接口方法 +- [x] 2. 扩展 IotCardHandler 添加 6 个 Gateway 接口方法 **What to do**: - 在 `internal/handler/admin/iot_card.go` 中添加以下方法: @@ -198,7 +198,7 @@ Critical Path: Task 1 → Task 3/4 → Task 6 --- -- [ ] 3. 扩展 DeviceHandler 添加 7 个 Gateway 接口方法 +- [x] 3. 扩展 DeviceHandler 添加 7 个 Gateway 接口方法 **What to do**: - 在 `internal/handler/admin/device.go` 中添加以下方法: @@ -243,7 +243,7 @@ Critical Path: Task 1 → Task 3/4 → Task 6 --- -- [ ] 4. 注册卡 Gateway 路由(6个) +- [x] 4. 注册卡 Gateway 路由(6个) **What to do**: - 在 `internal/routes/iot_card.go` 的 `registerIotCardRoutes` 函数中添加: @@ -288,7 +288,7 @@ Critical Path: Task 1 → Task 3/4 → Task 6 --- -- [ ] 5. 注册设备 Gateway 路由(7个) +- [x] 5. 注册设备 Gateway 路由(7个) **What to do**: - 在 `internal/routes/device.go` 的 `registerDeviceRoutes` 函数中添加: @@ -333,7 +333,7 @@ Critical Path: Task 1 → Task 3/4 → Task 6 --- -- [ ] 6. 添加集成测试 +- [x] 6. 添加集成测试 **What to do**: - 创建或扩展 `tests/integration/iot_card_gateway_test.go`: @@ -405,7 +405,7 @@ source .env.local && go test -v ./tests/integration/... -run TestGateway ### Final Checklist -- [ ] 所有 13 个接口可访问 -- [ ] 权限校验生效 -- [ ] OpenAPI 文档包含新接口 -- [ ] 集成测试通过 +- [x] 所有 13 个接口可访问 +- [x] 权限校验生效 +- [x] OpenAPI 文档包含新接口 +- [x] 集成测试通过