ai_member_xiaoban/memory/2026-05-25.md
2026-05-26 08:00:01 +08:00

26 lines
1.2 KiB
Markdown
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.

# 2026-05-25 工作日志
## user-info 技能重写
[刘庆逊提出] 修复 `user-info` 技能,使其匹配线上实际数据库结构。
### 问题
旧脚本引用的表(`bi_vala_app_account`、`account_login`、`account_detail_info`、`bi_vala_order`、`bi_level_unit_lesson`)在线上数据库均不存在。
### 修复内容
- **scripts/query_user_info.py** 完整重写:
- 表名改为实际线上表:`vala_user.vala_app_account`、`vala_user.vala_app_character`、`vala_order.vala_seasonal_ticket`、PG `user_chapter_play_record_0~7`
- 手机号查询通过 `tel LIKE '前缀%后缀'` 脱敏匹配
- Chapter → Level/Unit/Lesson 映射复用 studytime-analysis 的 `fetch_chapter_info_map()` 逻辑
- 订单数据改用 `vala_seasonal_ticket`(赛季通票),因线上无标准订单表
- 设备/地域信息标注为暂不可用(线上无对应表)
- PG 时区处理:`created_at` 为 tz-aware统一转 naive 比较
- **SKILL.md** 更新至 v2.0.0,补充数据覆盖说明
- **references/database_schema.md** 重写为实际线上表结构
### 已验证的查询方式
- `--account-id 14157`
- `--role-id 18556`
- `--phone 18000007778` ✓(脱敏匹配)
- `--order-id <id>` ✓(含账号有效性校验)