Conversation
🔧 修复和优化: - 🐛 修复通知推送失败问题(notify.py 添加 load_dotenv) - 💰 优化余额显示格式(已使用在前,添加💵符号) - ⏰ 优化时间显示格式(简化输出) - 📊 改进签到结果统计(全部成功时合并显示账号) 🎯 新增功能: - 🔔 智能通知策略(ALWAYS_NOTIFY 默认 false,仅失败或余额变化时推送) - 🖥️ 浏览器无头模式配置(HEADLESS 常量,支持服务器/调试模式切换) - 💬 优化通知内容格式(更清晰的余额和统计信息展示) 📝 文档更新: - 🎨 README 添加丰富的 Emoji,提升可读性 - 📖 新增浏览器模式配置说明 - 🔔 完善通知策略和格式示例 - 🎉 添加更新日志章节 🔄 代码重构: - 🏗️ 优化 checkin.py 通知逻辑 - 📦 改进 notify.py 环境变量加载 - 🔧 优化 .env.example 配置说明 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🔧 修改内容: - 🔄 调整provider字段说明,明确只支持anyrouter和agentrouter - 📋 优化配置示例格式 - ✨ 统一字段顺序展示(name, api_user, provider, cookies) 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…stem-with-image-display Add order management demo app
…ort-recipes 添加食谱管理工具
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| f'SELECT * FROM dishes WHERE id IN ({",".join("?" for _ in dish_ids)})', | ||
| tuple(dish_ids), | ||
| ) | ||
| rows = cursor.fetchall() | ||
| if len(rows) != len(dish_ids): |
There was a problem hiding this comment.
Handle duplicate dish IDs in order validation
In create_order, the validation compares len(rows) from the IN (...) query to len(dish_ids). When a client submits the same dish_id multiple times (e.g., separate line items instead of aggregating quantities), the SQL result only returns unique rows, so the length check fails and the API rejects a valid order as “订单包含无效菜品”. This makes the endpoint brittle for non-UI clients or future UI changes; de-duplicate IDs before the query or validate against a set to avoid false negatives.
Useful? React with 👍 / 👎.
1