feat: 购油方案功能 #28

Merged
hera merged 13 commits from fix/next-batch-2 into main 2026-04-13 13:07:09 +00:00
Owner

Summary

  • 会员在库存页请求定制购油方案(描述健康需求+选老师)
  • 老师在用户管理页看到请求,选配方+设频率,激活方案
  • 系统自动计算月消耗(滴数→瓶数→费用),交叉比对库存
  • 会员看到购油清单,缺少的可一键加入库存

🤖 Generated with Claude Code

## Summary - 会员在库存页请求定制购油方案(描述健康需求+选老师) - 老师在用户管理页看到请求,选配方+设频率,激活方案 - 系统自动计算月消耗(滴数→瓶数→费用),交叉比对库存 - 会员看到购油清单,缺少的可一键加入库存 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hera added 1 commit 2026-04-12 21:38:20 +00:00
feat: 购油方案 — 会员请求+老师定制+购油清单
Some checks failed
Test / unit-test (push) Successful in 5s
Test / build-check (push) Failing after 4s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / e2e-test (push) Failing after 3m5s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Failing after 10s
7ae2e73ee5
后端:
- oil_plans/oil_plan_recipes 表
- 7个API: teachers列表、方案CRUD、配方增删、购油清单计算
- 购油清单自动算月消耗、瓶数、费用,交叉比对库存

前端:
- 会员端(库存页): 请求方案→选老师→描述需求;查看购油清单
- 老师端(用户管理): 接收请求→选配方+频率→激活方案
- plans store 管理状态

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hera added 1 commit 2026-04-12 21:55:03 +00:00
fix: plans store使用api()替代不存在的requestJSON
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 17s
Test / e2e-test (push) Successful in 50s
1ca9bc1758
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-12 21:59:14 +00:00
fix: 老师选择改为精确输入匹配,不暴露老师列表
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Successful in 50s
fe74f45bca
输入老师的 display_name 或 username 精确匹配才能发送请求。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-12 22:04:17 +00:00
feat: 方案待定制可编辑+通知去定制按钮+权限修复
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Successful in 50s
a6c8e7a6e1
- 会员等待中可修改健康需求,修改后通知老师
- 通知里方案请求显示"去定制"按钮跳转用户管理
- 后端: 方案owner可更新health_desc,teacher可改title/status

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-12 22:07:38 +00:00
fix: 个人库存页未登录时显示登录引导
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 51s
ca3f409827
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-12 22:20:26 +00:00
feat: 取消显示名称,统一用户名,大小写不敏感去重,一次性改名
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 16s
Test / e2e-test (push) Successful in 52s
fdc7b20929
- 注册: 去掉display_name字段,用户名大小写不敏感去重
- 登录: 大小写不敏感匹配
- 用户菜单: 显示用户名+改名按钮(只能改一次)
- /api/me/username: 一次性改名API
- 启动时: sync display_name=username, 发通知告知用户
- 前端: 所有display_name显示改为username

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-12 22:30:51 +00:00
fix: 用户名通知润色+去修改按钮直接弹改名框
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 51s
9dbec0b9ee
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-12 22:35:28 +00:00
fix: 去掉账号设置里显示名称模块,用户管理去掉重复@username
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Has been cancelled
c3eb84ce8a
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-12 22:36:50 +00:00
fix: 去掉账号设置模块,直接显示修改密码
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Failing after 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Failing after 7s
Test / e2e-test (push) Successful in 51s
9aff530d53
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hera added 1 commit 2026-04-13 10:40:28 +00:00
fix: username_changed字段加入认证查询,改名后铅笔和通知按钮正确隐藏
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Failing after 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Failing after 8s
Test / e2e-test (push) Successful in 49s
f99a893139
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hera added 1 commit 2026-04-13 10:43:21 +00:00
feat: 方案定制界面重写 — 请求展示+配方搜索+草稿保存+定制记录
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 7s
Test / build-check (push) Failing after 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Failing after 6s
Test / e2e-test (push) Failing after 3m6s
e8a2915962
- 方案请求卡片显示用户名和健康需求
- 编辑器: 搜索配方添加(显示成分)、设频率、保存草稿/发送
- 定制记录列表: 显示所有方案状态(进行中/已归档/待定制)
- 修复: loadRecipes 加入 onMounted 使配方搜索可用

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hera added 1 commit 2026-04-13 11:51:54 +00:00
revert: 删除购油方案功能,修复MyDiary模板错误
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Successful in 53s
9e1ebb3c86
完全移除oil_plans相关代码:
- 后端: 7个API端点、2个数据库表
- 前端: plans store、Inventory方案UI、UserManagement方案编辑器
- UserMenu: 方案通知按钮
- 修复MyDiary.vue多余的section-card div导致的构建失败

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-13 11:55:03 +00:00
test: PR#28测试覆盖 — 用户名大小写、一次改名、自动翻译、去重
All checks were successful
PR Preview / test (pull_request) Has been skipped
Deploy Production / test (push) Successful in 6s
PR Preview / teardown-preview (pull_request) Successful in 13s
Test / unit-test (push) Successful in 5s
PR Preview / deploy-preview (pull_request) Has been skipped
Test / build-check (push) Successful in 4s
Deploy Production / deploy (push) Successful in 6s
Test / e2e-test (push) Successful in 49s
b58ba4e99f
单元测试274个(新增18个):
- recipeNameEn额外用例、oilEn翻译、用户名大小写匹配、改名守卫
E2E新增:
- 注册大小写去重、登录大小写匹配、一次改名+拒绝二次
- 配方自动翻译、改名重翻译、删除用户转移配方

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-28.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-28.oil.oci.euphon.net DB is a copy of production.
hera merged commit b58ba4e99f into main 2026-04-13 13:07:09 +00:00
Author
Owner

🗑️ Preview torn down.

🗑️ Preview torn down.
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hera/oil-formula-calculator#28