fix(backend): 架构质量改进批次二 (#32-37)

- #32 License 激活迁移到 license_devices 表:Activate/Verify/Deactivate 全部改用
  license_devices,新增 max_devices 校验和 GET /license/devices 端点;
  Activate 现在校验 shop_id 防跨租户激活
- #33 checkInventory 从 StockOutHandler 移到 StockService.CheckInventoryAvailability
- #34 新增 util/response.go 统一错误响应工具(RespondError/RespondSuccess/RespondCreated)
- #35 生产模式 CORS Origin='*' 启动时 Fatal
- #36 生产模式 License 私钥未配置启动时 Fatal
- #37 新增 util/page.go ValidatePageSize,应用到 partner/product/stock_in/stock_out handler

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-11 00:38:49 +08:00
parent 51cfe5fc6d
commit 3ab78dbf7a
15 changed files with 554 additions and 429 deletions
+10 -10
View File
@@ -1,7 +1,7 @@
{
"meta": {
"title": "酒库管理系统 — 项目 TODO",
"updated_at": "2026-06-10T15:32:03.641Z"
"updated_at": "2026-06-10T16:38:37.763Z"
},
"seq": 40,
"items": [
@@ -477,7 +477,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:13.249Z",
"done": false,
"completed_at": null,
@@ -492,7 +492,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:15.102Z",
"done": false,
"completed_at": null,
@@ -507,7 +507,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:16.854Z",
"done": false,
"completed_at": null,
@@ -523,7 +523,7 @@
"后端",
"数据库"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:25.715Z",
"done": false,
"completed_at": null,
@@ -538,7 +538,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:28.106Z",
"done": false,
"completed_at": null,
@@ -553,7 +553,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:33.596Z",
"done": false,
"completed_at": null,
@@ -568,7 +568,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:44.159Z",
"done": false,
"completed_at": null,
@@ -583,7 +583,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:46.792Z",
"done": false,
"completed_at": null,
@@ -598,7 +598,7 @@
"tags": [
"后端"
],
"status": "open",
"status": "done",
"created_at": "2026-06-10T15:31:49.032Z",
"done": false,
"completed_at": null,