Commit Graph

196 Commits (41c8fda3987e5ba6989de4775d0d96216d66f94a)

Author SHA1 Message Date
Council 41c8fda398 council(review): BackendArchitect - add Task 12, all reviews complete
All tasks done:
- Tasks 1-8: BackendArchitect root cause analysis
- Tasks 9-11: DebugAgent static analysis + ROOT_CAUSE report
- Task 12: BackendArchitect cross-review of DebugAgent report

Issue #13 root cause fully documented and cross-verified.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:57:01 +08:00
Council 7a14acf6bc council(review): SecurityEngineer - Round 2 安全审计完成:根因定位 + 修复建议
根因:AdminGoodsSaveHandle.php:77 - \$r['id'] 无空安全
Secondary:Line 71 - find() 返回 null 后直接访问 \$template['seat_map']
报告:reviews/SecurityEngineer-AUDIT.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:56:52 +08:00
Council 6c35ac5c0f Merge branch 'council/BackendArchitect' 2026-04-20 09:56:20 +08:00
Council 8211419400 council(review): BackendArchitect - approve DebugAgent ROOT_CAUSE report
- Confirms Primary/Secondary/Tertiary root causes
- Notes array_column(null) PHP 8.0+ warning finding
- No conflicts with BackendArchitect findings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:56:16 +08:00
Council 4b48e4648e council(review): DebugAgent - Task 10-11 complete, ROOT_CAUSE report
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:54:31 +08:00
Council 30a7663b16 council(review): DebugAgent - Task 10-11 complete, ROOT_CAUSE report
- 验证 ShopXO prefix = 'vrt_', 两者等价(已排除)
- 确认 P1=77行$riid, P2=71行template null, P3=类型不匹配
- 输出 reports/DebugAgent-ROOT_CAUSE.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:53:20 +08:00
Council 56b291f2f8 council(draft): DebugAgent - resolve plan.md conflict, sync with main
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:51:57 +08:00
Council 9d111541af council(draft): DebugAgent - Round 1 静态分析 + 补充 plan.md + Task 9-11
- 补充 PHP 8+ ?? 行为分析
- 新增 reviews/DebugAgent-PRELIMINARY.md
- plan.md 新增 Task 9-11(DebugAgent Round 2)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:51:04 +08:00
Council 3799b2bc92 council(review): BackendArchitect - Issue #13 根因已定位:AdminGoodsSaveHandle.php:77
- Primary: $r['id'] 无空安全(array_filter 回调内)→ "Undefined array key 'id'"
- Secondary: find() 返回 null 后直接访问 $template['seat_map']
- Tertiary: selected_rooms 类型不匹配静默失败
- 已排除:表前缀问题(Db::name 和 BaseService::table 均查询 vrt_vr_seat_templates)
- 已排除:SeatSkuService::BatchGenerate 有正确的空安全处理

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:48:53 +08:00
Council 04766c2424 council(draft): BackendArchitect - create debug plan for "Undefined array key 'id'" error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:46:29 +08:00
Council 0385f79106 council(draft): DebugAgent - plan.md: debug "Undefined array key id" error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 09:46:20 +08:00
Council 98bd6a52cf docs: 补充 template_snapshot 前端vs后端职责说明 + 更新 Issue #13 进度 2026-04-20 09:43:29 +08:00
Council bbea35d837 feat(AdminGoodsSaveHandle): 保存时自动填充 template_snapshot
Issue #13 Step 1:
- save_thing_end 时机:遍历 vr_goods_config[],检测 template_snapshot 是否缺失
- 若缺失:从 vr_seat_templates 读最新 seat_map,按 selected_rooms 过滤 rooms
- 将填充后的完整 config JSON 写回 goods 表,再执行 BatchGenerate
- 前端已传 template_snapshot 时:直接透传,无需后端处理
2026-04-20 09:36:06 +08:00
Council 7f32ad87c2 docs: README 重构 + VR_GOODS_CONFIG_SPEC.md 加目录 + 追加开发日志第十三章
- README: 新增清晰文档索引(必读/实现参考/调研存档/历史存档四分类)
- VR_GOODS_CONFIG_SPEC.md: 加 Markdown TOC
- DEVELOPMENT_LOG.md: 追加第十三章(模板渲染修复 + v3.0 格式确认)
2026-04-20 09:25:01 +08:00
Council 741f25451c docs: v3.0 最终规格 - template_snapshot 字段 + selected_sections 对象格式
核心变更:
- 新增 template_snapshot 字段(发布时从 vr_seat_templates 读取并存储)
- selected_sections 确认为对象格式 { room_id: ["A","B"] }
- spec_base_id_map 使用 goods_spec_base.extends 动态构建
- 现有前端编辑体验完全不受影响
- Issue #13 已同步更新
2026-04-20 09:04:23 +08:00
Council 6daa332323 docs: v3.0 vr_goods_config spec + Phase2 plan v3.0
v3.0 核心变更:
- selected_sections 改为数组格式 [A,B]
- spec_base_id_map 使用 goods_spec_base.extends 动态构建
- seat_key 格式: roomId_rowLabel_colNum(无 MD5)
- 完整规格文档: docs/VR_GOODS_CONFIG_SPEC.md
2026-04-20 08:30:00 +08:00
Council 977cc57aef docs: new vr_goods_config spec + Phase 2 v2.0 plan 2026-04-20 07:24:57 +08:00
Council 1b0ac3276d fix: 替换为票务专用精简 footer
移除 ShopXO 默认导航(关于我们/招聘/客户服务等)
保留:返回首页 + 版权 + ICP备案
2026-04-20 06:35:24 +08:00
Council c894e70188 fix: 复制 ShopXO public 模板 + 修复 footer_page 不存在问题
- 将 ShopXO 默认主题 public/ 目录完整复制到插件 goods/public/
- ticket_detail.html 中 footer_page → footer(footer_page.html 不存在于 ShopXO)
- ModuleInclude() 现在可以正确解析:view_path(goods/) + public/header.html 
2026-04-20 06:29:37 +08:00
Council 349ec063c1 fix: 替换 ThinkTemplate 标签为 PHP ModuleInclude
路线 B:票务模板不依赖 ThinkTemplate 解析引擎
- {include file=...} → <?php echo ModuleInclude(...) ?>
- {:Config()} / {:IsMobileLogin()} → <?php echo Config() ?> / <?php echo IsMobileLogin() ?>
- {$var|default=...} → <?php echo $var ?? 'default' ?>
- {$var|json_encode|raw} → <?php echo json_encode($var ?? []) ?>

绕过 ThinkTemplate parseTemplateFile() 路径拼接 bug(Linux view_depr=/ 导致 include 路径解析错误)
2026-04-20 06:23:29 +08:00
Council bf71aa1098 docs: add Council evaluation report (Architect + BackendArchitect)
综合评审:
- docs/14: 表名前缀不一致(vr_seat_templates vs vrt_vr_seat_templates)
- DEVELOPMENT_LOG: Git 状态落后一个提交
- PHASE2_PLAN: 核销 API 安全上下文缺失
Top 3 问题已定位,行动清单已列出
2026-04-20 05:30:23 +08:00
Council 496271c468 council(review): Architect - 完成三份文档评审,输出 Top 3 修正建议
Top 3 问题:
1. `{include}` 标签验证状态未闭环(已提交 ≠ 已验证)
2. DEVELOPMENT_LOG 两条 Git 时间线未衔接
3. 测试数据 goods_id 在多份文档中出现三个不同值

详见 reviews/Architect-DOC-SUMMARY.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 05:29:36 +08:00
Council ce20d2b430 council(review): BackendArchitect - 完成三份文档评审
- reviews/BackendArchitect-on-14_TEMPLATE_RENDER_INVESTIGATION.md
- reviews/BackendArchitect-on-PHASE2_PLAN.md
- reviews/BackendArchitect-on-DEVELOPMENT_LOG.md
- reviews/BackendArchitect-DOCUMENTATION_REVIEW_SUMMARY.md

Top 3 问题:
1. vr_seat_templates 表名前缀不一致(docs/14)
2. docs/14 缺少 Phase 1/Phase 2 改法关系说明
3. DEVELOPMENT_LOG.md 11.3 Git 快照已过时

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 05:28:58 +08:00
Council e8554f29ad council(draft): Architect - 文档评估计划(Round 1)
评审三份文档:
- docs/14_TEMPLATE_RENDER_INVESTIGATION.md
- docs/PHASE2_PLAN.md
- docs/DEVELOPMENT_LOG.md(第十一、十二章)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 05:25:54 +08:00
Council 3775f42789 council(draft): BackendArchitect - add documentation review plan
- Add BackendArchitect Round 1 section to plan.md
- Claim 4 review tasks: 3 docs + 1 summary
- Dimensions: accuracy, completeness, actionability, consistency, misleading risk

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 05:25:48 +08:00
Council 914e2a0fc3 docs: 修正 docs/14 + 新增 PHASE2_PLAN.md
- docs/14: 修正数据流/表名/Think驱动等3处错误,删除过时状态
- PHASE2_PLAN.md: Phase 2 当前状态 + 模板渲染待验证项 + 下一步计划
- DEVELOPMENT_LOG.md: 追加 Phase 2 完成记录
2026-04-20 05:24:26 +08:00
Council 7bd8967648 feat(Phase 2): 完成票务商品前端展示层
- Goods.php: item_type=ticket 时加载 ticket_detail.html 模板
- SeatSkuService.php: 新增 GetGoodsViewData() 供前端模板使用
- TicketService.php: onOrderPaid 改用 sxo_order_detail 表 + JSON spec 解析

关联: Phase 2 前台展示层完成
2026-04-20 05:22:07 +08:00
Council dc63cff77c chore: clean up my_test_plugin residual hooks from event.php
删除 event.php 中的 my_test_plugin 残留引用(插件已删除)。
保留 vr_ticket 所有钩子映射不变。
2026-04-19 15:56:48 +08:00
Council bbb2e65330 fix: 修复 vr_ticket 插件文件被 gitignore 忽略的问题
- 强制追踪 vr_ticket/Event.php(被 shopxo/app/.gitignore 的 event.php 规则遮蔽)
- 强制追踪 vr_ticket/database/migrations/*.sql(被全局 gitignore 的 database 规则遮蔽)
- 删除 shopxo/app/.gitignore(规则过宽,影响插件文件)
- 追踪 shopxo/app/event.php(ShopXO 源码,被上条 .gitignore 遮蔽)
- 更新项目 .gitignore(vendor/upload/adminufgeyw/强制追踪database)
2026-04-19 15:54:03 +08:00
Council f3f12e3ea5 chore: exclude adminufgeyw.php (ShopXO install-specific, restored from council-research) 2026-04-19 15:45:38 +08:00
Council dfee295709 chore: update .gitignore (add vendor/upload/data.db), drop outdated comment 2026-04-19 15:38:40 +08:00
Council b9da3e6fb7 docs: add category_id empty bug analysis report (P0) 2026-04-19 07:38:27 +08:00
Council 9603ab42f6 refactor(vr_ticket): Admin.php root pattern → Hook-based goods save
- DELETE old Admin.php root controller (Vrticket.php)
- DELETE old Layui view files (seat_template/ticket/venue/verification/verifier)
- ADD hook/AdminGoodsSave.php: plugins_view_admin_goods_save hook (Vue3 form injection)
- ADD hook/AdminGoodsSaveHandle.php: handle save flow (save_handle + save_thing_end)
- UPDATE config.json: register 3 new hooks
- UPDATE SeatSkuService.php: refactored BatchGenerate
- ADD data.db: SQLite venue data
- UPDATE venue/save.html: venue editing form
- docs: add GOODS_ADD_HOOK_RESEARCH.md + update plan.md
2026-04-19 05:46:37 +08:00
Council 111063d785 docs: add 13_GOODS_ADD_HOOK_RESEARCH.md - goods add hook survey
- Code-verified: vr_seat_templates full field list + seat_map v3 JSON structure
- Confirmed: no goods_save hook exists yet, no vr_goods_config table
- Critical bug found: SeatSkuService.php has corrupted \t\think\xacade strings (P0 fix)
- Two-hook design: plugins_view_admin_goods_save + plugins_service_goods_save_handle
- goods.vr_goods_config JSON field (no new table needed)
- BatchGenerate extension: room/section filtering
2026-04-17 21:49:21 +08:00
Council 207f49839b docs: add 12_UNIAPP_FRONTEND_RESEARCH.md - shopxo-uniapp frontend architecture survey
- ShopXO DIY designer limitations (cannot import custom Vue components)
- shopxo-diy vs shopxo-uniapp architecture relationship
- Recommended path: fork shopxo-uniapp, modify Vue source directly
- H5/mini-program CSS consistency via rpx + uni-app WebView
- Full evidence archive and pending deep-dive items for 美在
2026-04-17 13:54:13 +08:00
Council 2452fde466 refactor(vr_ticket): full plugin restructure - Admin.php root pattern + Hook.php
Phase 2 completion - complete backend management rebuild:

Plugin architecture change (旧 → 新):
- 删: admin/controller/ 子目录多控制器 → 留: admin/Admin.php 单控制器
- 删: admin/view/ → 留: view/{module}/
- 删: EventListener.php, app.php, plugin.json → 留: Hook.php, config.json

New files:
- Hook.php: 插件钩子入口(侧边栏菜单 + 订单支付处理)
- config.json: 插件配置(is_enable 等)
- install.sql / uninstall.sql: 安装卸载脚本
- view/venue/list.html, save.html: 场馆管理视图(AmazeUI)
- view/admin/setup.html: 插件设置页

Modified files:
- service/AuditService.php, BaseService.php, SeatSkuService.php, TicketService.php
- admin/Admin.php: 全新 Admin.php 根目录控制器

ShopXO core changes:
- app/index/controller/Goods.php: ticket 类型商品详情页路由
- app/service/AdminPowerService.php: 权限系统适配
- config/shopxo.php: 配置

AmazeUI frontend migration:
- All views migrated from LayUI to AmazeUI
- Vue 3 editor for venue/seat configuration
- CDN: unpkg.com → cdn.staticfile.net

Fixes included:
- Infinite loading (missing footer include)
- Vue3 textarea interpolation bug
- Template path resolution (../../../plugins/...)
- Hook return fields (id/url/is_show)
- DB field names verified from source
2026-04-17 00:46:00 +08:00
Council e7730170f3 docs: add EXPERIENCES.md - 16 critical lessons from refactoring session
- docs/EXPERIENCES.md: Cleaned experience document with P0/P1/P2 classification
  - P0: footer missing → infinite loading, Vue3 textarea interpolation, field names from source
  - P1: plugin view paths, Hook.php return fields, CDN blocking, PHP comment pollution
  - P2: AmazeUI classes, Base64 URL encoding, search field consistency
- README.md: Add prominent link in top section + update project status
- docs/refactoring_learnings.md: Granular 24-round extraction from raw log
2026-04-17 00:43:34 +08:00
Council f6bcad6bfb fix: 表名前缀修复 + 创建缺失的audit_log表
- BaseService::table() 从 'plugins_vr_' 改为 'vr_'
  (原名 plugins_vr_seat_templates → ShopXO前缀后变成 vrt_plugins_vr_seat_templates,实际表名是 vrt_vr_seat_templates)
- Admin.php 所有硬编码 Db::name('plugins_vr_xxx') 改为 Db::name('vr_xxx')
- 在数据库创建缺失的 vrt_vr_audit_log 表
2026-04-16 17:23:40 +08:00
Council e9480b6866 docs: add VR plugin refactor briefing 2026-04-16 16:10:37 +08:00
Council 28103e7d9b docs: 补充自定义侧边栏快速入口机制说明 2026-04-16 15:59:37 +08:00
Council 4593c96119 docs: 更新部署配置(admin文件名/数据库名/源码路径/表前缀) 2026-04-16 15:50:55 +08:00
Council 35c10a7f66 council(security): SecurityEngineer - add missing VenueList methods + security audit
Security findings:
- SQL injection: LOW (query builder + parameter binding)
- XSS: LOW (ThinkPHP auto-escape, no |raw detected)
- Path traversal: LOW (all view paths hardcoded)
- CSRF: MEDIUM (ShopXO framework-level gap, out of scope for plugin)

Critical fix: admin/Admin.php was missing VenueList(), VenueSave(),
VenueDelete() — sidebar URL "/plugins/vr_ticket/admin/venueList" would
return 500 error. Added all three methods with v3.0 seat_map support.

P1 garbled name: documented DB fix SQL for shx_plugins + vrt_power tables.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 08:53:41 +08:00
Council 000a0990e7 council(round3): merge main (BackendArchitect Phase 2 fixes) + FrontendDev Admin.php routing
BackendArchitect 贡献:
- Vrticket.php (app/admin/controller/) - 独立后台控制器
- 视图复制到 app/admin/view/default/plugins/view/vr_ticket/admin/view/
- admin/controller/Plugins.php - 插件路由入口
- admin/controller/Venue.php + view/venue/ - 场馆管理
- app.php - 插件主文件

FrontendDev 贡献(本次):
- admin/Admin.php - 统一入口控制器(admin/ 子目录模式)
- plugin.json - sidebar URL 改为 camelCase 格式匹配 ucfirst()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 08:35:26 +08:00
Council b41e268a77 council(round3): FrontendDev - fix admin/Admin.php routing + camelCase sidebar URLs
路由分析结论:
- PluginsService::PluginsControlCall 使用 ucfirst() 转换类名
- sidebar URL /plugins/vr_ticket/admin/seatTemplateList
- → class=\app\plugins\vr_ticket\admin\Admin, method=SeatTemplateList()
- admin/Admin.php 方法名使用 camelCase 与 URL 匹配

修改内容:
- admin/Admin.php: 更新注释,方法名已使用 camelCase ✓
- plugin.json: sidebar URL 从 snake_case 改为 camelCase 格式

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 08:34:50 +08:00
Council 06a22c6a18 council(plan): FrontendDev - Phase 2 bugfix plan: routing + encoding issues
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 08:11:57 +08:00
Council d75eaa80a1 council(draft): SecurityEngineer - create plan.md for Phase 2 security audit
Analyzes two critical issues:
1. Sidebar garbled text (UTF-8/Latin1 encoding corruption in vrt_power/plugins tables)
2. Plugin controller routing failure (wrong directory structure vs freightfee Admin.php pattern)

Proposes root cause hypotheses and step-by-step investigation + fix plan.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 08:11:43 +08:00
Council 5749edf6ad fix(Phase 2): 修复后台路由+视图路径,Vrticket控制器上线
- 新增 Vrticket.php(ThinkPHP小写路由约定,类名Vrticket)
- 修复视图标签:{include} → {{include}}(ShopXO使用{{}}分隔符)
- 视图文件同步到 app/admin/view/default/plugins/view/vr_ticket/
- 插件控制器类名 Seattemplate(ThinkPHP路由适配)
- plugin.json 新增场馆配置菜单项
- 删除废弃的 plugins/index.html 符号链接
- 自动载入:app.php 注册 app\plugins\ 命名空间映射
2026-04-16 07:59:27 +08:00
Council f1f061a8d7 docs: Phase 3-1 测试数据迁移完成(vr_seat_templates id=1 → v3.0 格式) 2026-04-15 22:16:42 +08:00
Council 9d8992ff41 docs: Phase 3-1 checklist 更新(Venue.php / list.html / save.html 已完成) 2026-04-15 22:06:42 +08:00
Council 49e256a9ab feat(Phase 3-1): Vue3 交互式场馆配置表单编辑器 save.html
- admin/view/venue/save.html:Vue3 CDN 嵌入
  - 实时彩色座位预览(每格 30x30px,背景色=zone.color,悬浮显示座位号/分区/价格)
  - 动态增删分区(char/name/price/color + 预设色板)
  - 每排座位行编辑器(动态 input)
  - 双向同步:改 zone char/color → 预览即时刷新
  - 初始默认值:3 区(VIP区/看台区/普通区),6座/排
  - mounted() 回填:zones_json / map_json / venue_json
  - computed 序列化:zonesJson / seatMapRowsJson / venueJson → 隐藏字段

- Venue.php 补充:新增 venue_json 字段供 Vue3 回填
  - venue_json = {name, address, image}

关联:docs/11_EDITOR_AND_INJECTION_DESIGN.md v3.0
2026-04-15 22:06:21 +08:00