OuYingJun1024
|
1893c01f54
|
feat(welfare): savings/battle 返回 compare_count(累计完成比价次数)
- SavingsBattle 仓储/schema/接口新增 compare_count(= 有效记录数,与 order_count 同源)
- 更新 docs/api/savings-battle.md 与 tests/test_welfare.py 断言
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-05 10:45:21 +08:00 |
|
OuYingJun1024
|
1a893d8d96
|
docs(admin): 补充管理后台 API 与数据库文档
新增 admin 模块接口文档(auth login/me、admins CRUD、audit-logs、feedback 处理、stats 概览、user coins/detail/status、wallet 流水、withdraw 对账/刷新/列表) + admin_user/admin_audit_log 两张表文档,更新 api/database README 索引。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-04 15:43:07 +08:00 |
|
ouzhou
|
90c0d65a16
|
chore(alembic): merge comparison_milestone 和 savings_report_fields 两个 head (#11)
Co-authored-by: OuYingJun1024 <1034284404@qq.com>
Reviewed-on: #11
Co-authored-by: ouzhou <ouzhou@wonderable.ai>
Co-committed-by: ouzhou <ouzhou@wonderable.ai>
|
2026-06-03 09:48:28 +08:00 |
|
ouzhou
|
da7ce69494
|
feat(ad): eCPM 上报接口 + 冷却策略解耦纯函数 + savings JSONB 跨库修复 (#8)
- 新增 POST /api/v1/ad/ecpm-report:激励视频展示后客户端上报本次 eCPM,落 ad_ecpm_record 做内部收益统计(model/repository/schema/alembic 迁移 + 接口文档)
- 看广告冷却策略抽到 app/core/ad_cooldown.py 纯函数;ad_reward.today_status 只取数据,换策略只改这一处
- savings.dishes 改 JSON().with_variant(JSONB,"postgresql"):SQLite 无 visit_JSONB 会让 create_all 编译崩,修复后测试套件恢复
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: OuYingJun1024 <1034284404@qq.com>
Reviewed-on: #8
Co-authored-by: ouzhou <ouzhou@wonderable.ai>
Co-committed-by: ouzhou <ouzhou@wonderable.ai>
|
2026-06-01 22:23:15 +08:00 |
|
marco
|
6c7eaa9734
|
docs: 跟齐 5 月 PR (#4 user/feedback / #5 ad-cooldown / #6 PG / abd8eab meituan 降级)
整轮 doc 跟齐 2026-05 落地但 doc 没补全/没更新的内容. 按 P0~P3 优先级处理.
P0 - 新 API doc + index 更新:
* docs/api/user-profile.md (新) PATCH /api/v1/user/profile 改昵称
* docs/api/user-avatar.md (新) POST /api/v1/user/avatar 上传头像(魔数嗅探/旧文件清理)
* docs/api/user-delete.md (新) DELETE /api/v1/user 注销账号(软删+匿名化)
* docs/api/feedback.md (新) POST /api/v1/feedback 提交反馈(含截图)
* docs/api/README.md 加 User/Feedback 组 + /media 静态服务段 +
修 UserOut "无接口可改恒为 null" 过时描述
P0 - 美团降级 / 现有 doc 校准:
* docs/api/meituan-coupons.md 加 "未配 MT_CPS 凭证降级返空" 说明
* docs/api/meituan-referral-link.md 同上 + 客户端兜底建议
* docs/api/meituan-feed.md 区分两种空结果路径(未配 vs 调用失败) +
/health.mt_cps_configured 排障入口
* docs/integrations/meituan.md "未配凭证降级" + "feed 静默吞错" 写进集成层
* ad-reward-status.md PR #5 commit 已自带 doc 更新, 复核无需再改
P1 - 主文档大改:
* docs/后端技术实现.md
- §1 能力表加 用户资料/外卖比价/钱包/福利/广告/反馈 (从 3 条扩到 9 条)
- §1 数据模型纠正 "仅 1 张 user 表" -> 现有 10 张 + alembic_version
- §2 DB 行 PG 主 / SQLite 兜底 + 加 psycopg3 行
- §3 目录树补 user.py / feedback.py / media.py / repositories/feedback.py /
scripts 子项 / docs/postgres-migration.md
- §7 数据模型重写: 10 张业务表速查表 + alembic 合并迁移 f01db5d77dac 始末
- §8 部署: 加 init_postgres.py 一句话流程 + checklist 加 "DATABASE_URL 切 PG"
+ "psycopg3 已装" + "MEDIA_ROOT 可写"
- §10 已知问题: 加 美团降级 / agent 不鉴权 / MEDIA_ROOT serve / init_postgres bug /
alembic 多 head 风险; 删过时 SQLite 行
- 接口计数 11 -> 38
* docs/待办与技术债.md
- 已解决追加: PG 切换 / 外卖比价透传 / 用户资料反馈接口 / 美团降级 /
看广告 4 态冷却
- 新增 "P2 DB 与 Alembic 治理" 段: alembic 多 head 团队规约 (含本次撞坑实录) +
init_postgres.py 已知 5 处小 bug + MEDIA_ROOT serve
P2 - PG 迁移文档互指 + 迁移链补完:
* docs/数据库迁移.md
- 顶部加 postgres-migration.md / 后端技术实现.md 互指
- §6 迁移链 9 条 -> 12 条 (含 feedback_table / convert_dishes_jsonb /
merge_pg_jsonb_and_feedback_heads)
- §7 踩坑里 "多 head" 一行扩成完整故事 + 修复命令 + 团队预防规约
* docs/postgres-migration.md
- 顶部加 数据库迁移.md / 后端技术实现.md §10 互指
P3 - 上线清单:
* docs/看广告赚金币上线清单.md
- 设计要点加 PR #5 4 态 CTA + 后端权威派生说明 +
VIDEO_ROUND_REQUIRED_COUNT/VIDEO_ROUND_COOLDOWN_SECONDS 常量
- §E 端到端验收加 本轮冷却 / 弹窗 limit note / 跨设备一致 三项
所有最后更新日期同步到 2026-05-31.
|
2026-05-31 11:05:10 +08:00 |
|
OuYingJun1024
|
56f4548654
|
feat(ad-reward): reward-status 加本轮 3 次冷却字段 (round_count + cooldown_until)
让客户端 4 态任务行 CTA (Normal/Loading/Capped/CoolingDown) 与 ExitReward
弹窗 limit note (本轮看完/今日看完 二选一) 都由后端权威派生, 跨设备 / 重装 /
杀进程都一致, 客户端不再依赖 in-memory 本地存储。
- core/rewards.py: 加 VIDEO_ROUND_REQUIRED_COUNT=3 / VIDEO_ROUND_COOLDOWN_SECONDS=600
- repositories/ad_reward.py: today_status 从 3-tuple 扩成 5-tuple,
从已有 created_at 字段按 ORDER BY DESC + OFFSET round_count 派生最近一个
已完成轮末尾时间; 零新字段零新表
- schemas/ad.py: AdRewardStatusOut + TestGrantOut 加 round_count + cooldown_until
- api/v1/ad.py: reward_status / test_grant 接 5-tuple
- tests: 加 4 个覆盖 (初始 / 未达一轮 / 刚达一轮进冷却 / 冷却已过)
- docs/api/ad-reward-status.md: 补字段说明 + 客户端 4 态 CTA 推导规则 +
"冷却仅 UX, 发奖不受影响" 注解
冷却是 UX 约束: pangle-callback 发奖只看 daily_limit, 冷却期间穿山甲
回调照常发奖, 不另设拒发分支。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 13:27:56 +08:00 |
|
marco
|
ba946a9d9a
|
fix(docs): 移除 3ff95db merge commit 残留的冲突标记
3ff95db 那次 merge 时, IDE/editor 已经修改文件但 my Edit 被 file-freshness
guard 拒绝,后续 git add/commit/push 把仍带 <<<<<<< / =======/>>>>>>> 的
coupon-step.md 推上去了 —— 已部署文档破损。
按原合并方案 fix-forward:鉴权行用精确版「Bearer access_token(客户端契约;Server
MVP 阶段不强校验)」,⚠️ 段保留「前端已接通」详述 + 用「客户端契约 vs Server
实现」措辞写鉴权状态 + device_id 用途 + P1 链接。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-28 10:49:01 +08:00 |
|
marco
|
3ff95dba76
|
Merge origin/feature/coupon-claim-integration: 合并 coupon-step.md 鉴权措辞两边
冲突:本地 36f6465(MVP 不鉴权 + 前端已接通详述 + P1 指向)与远程 3d1bb78
(鉴权措辞精确化:Android 已带 Bearer 客户端契约 / Server MVP 不强校验)。
解法:综合两边——
- 鉴权行用远程精确版「Bearer access_token(客户端契约;Server MVP 阶段不强校验)」
- 说明段保留本地「前端已接通」路径详述(远程版没有)+ 用远程的「客户端契约 vs
Server 实现」措辞重写 ⚠️ 段 + 本地的 device_id 用途说明 + P1 链接。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-28 10:48:05 +08:00 |
|
no_gen_mu
|
3d1bb78afe
|
docs(api/coupon-step): 鉴权说法精确化 — Android 已带 Bearer / Server MVP 不强校验
P1 接通真机验证时 logcat 实证 Android 客户端通过 AuthInterceptor 自动带
Authorization: Bearer <access_token> 头(见 shaguabijia-app-android 仓
data/net/ApiClient.kt:36)。原 docs 只写「鉴权:Bearer access_token」描述
契约目标,但没说明 server 端 MVP 不强校验的实现现状,容易让对接方误以为
缺 token 就 401。
L3 + L18 修订后清晰描述「客户端契约 vs Server 端 MVP 实现」两端联合状态,
不动 server 代码(coupon.py 仍 MVP 不接 Depends, P1 后启用)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-28 10:44:19 +08:00 |
|
marco
|
36f646597d
|
docs: 同步领券去鉴权 + 前端已接通(收尾 stash 的预 WIP + merge 冲突解决)
应用本次会话开始时 stash 的两份文档 WIP(主题一致:领券去鉴权后的文档同步):
- docs/api/coupon-step.md: 鉴权 Bearer → 无(MVP);入参说明加 device_id;说明段去
"鉴权壳"措辞,加"前端已接通"链路 + MVP 不鉴权数据债说明(指向 P1)。
- docs/后端技术实现.md: 行 18 表格 / section 6 段 / 已知问题表三处 stash pop
已干净 apply;一句话总结(行 20)"鉴权 + 透传壳"→"透传壳"对齐;api/v1/ 文件树
冲突 — 采纳同事 8 行 router 清单(wallet/signin/tasks/savings/ad 新加),给
coupon.py 行末尾加"MVP 不鉴权",并补 compare.py 一行(本分支刚加的外卖比价
透传,同事 commit 那时还没有,补上保持文档跟代码一致)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-28 10:43:53 +08:00 |
|
marco
|
16b78478c0
|
Merge remote-tracking branch 'origin/main' into feature/coupon-claim-integration
# Conflicts:
# docs/api/README.md
|
2026-05-28 10:33:35 +08:00 |
|
marco
|
aa34ad7d0b
|
feat(compare): 外卖比价 2 端点透传到 pricebot-backend (food MVP)
仿 coupon_step 在 app/api/v1/compare.py 加纯 body 透传 2 端点(MVP 不鉴权,只读
device_id/trace_id/step 打日志,不做 schema 校验)。client /api/v1/{intent/recognize,
price/step} → backend 去掉 /v1 转发到 PRICEBOT_BASE_URL,接通外卖比价
client→server→pricebot-backend 链路。
- compare.py: _passthrough helper + intent/recognize + price/step
- config.py: PRICEBOT_COMPARE_TIMEOUT_SEC=60(意图识别大上下文 LLM、price/step
每帧 LLM,比领券 30s 长;对齐客户端 agent ApiClient 的 60s 读超时)
- main.py: 注册 compare_router
- tests/test_compare_proxy.py: 2 端点参数化测试(透传/5xx→502/不可达→502/坏 JSON→400)
- docs/api/{compare-intent-recognize,compare-price-step}.md + 更新 README 索引
- 待办与技术债.md P2 外卖 2 端点标 ✅(2026-05-27);电商 2 个待接(compare.py
加两行即可)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-28 10:29:20 +08:00 |
|
OuYingJun1024
|
3d1e8969e6
|
docs: 新建 docs/integrations 集成层文档 + api 文档变薄
- 新增 docs/integrations/(README + jiguang/sms/meituan/pangle/wxpay 各一篇):
记录各 SDK 集成的签名/验签/加解密/协议细节与踩坑(对齐 app/integrations 分层)
- docs/api 接口文档变薄: 受影响接口头部加「集成实现」链接,把验签/RSA/CPS 签名
等重逻辑描述移到集成文档;ad-pangle-callback 验签段精简为指针
- docs/api/README 补架构说明(api 薄 / 重逻辑在 integrations)
- 后端技术实现.md 目录树补全(福利/钱包/签到/省钱/发奖端点 + crud/integrations 现状),
pangle/wxpay 标注移入 integrations
- ad_reward_golive_checklist 路径同步 core→integrations
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 20:45:12 +08:00 |
|
OuYingJun1024
|
18ab7eab92
|
docs(api): 补全福利/钱包/提现/签到/任务/省钱/看广告 21 个接口文档
按 docs/api 一接口一文件约定新增:
- 钱包(11): account / coin-transactions / cash-transactions / exchange-info / exchange / bind-wechat / unbind-wechat / withdraw-info / withdraw / withdraw/status / withdraw-orders
- 签到(2): status / 执行签到
- 任务(2): list / {task_key}/claim
- 省钱(3): summary / battle / records
- 看广告发奖(3): pangle-callback(S2S验签) / reward-status / test-grant(仅联调)
- README 索引补 12–32 行 + 新增「游标分页约定」+ 修正鉴权说明 + 注明金额以分为单位
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 17:50:01 +08:00 |
|
marco
|
a2263b48a0
|
docs: API 文档拆分为 docs/api/(索引+一接口一文件), 补全遗漏的 coupon/step
- 单文件 docs/API.md 拆成 docs/api/: README.md(传送门索引: 11 接口总览表 +
通用约定 + 复用结构) + 11 个一接口一文件, 便于接口增多后维护
- 补全此前 API.md 与技术文档均遗漏的核心接口 coupon-step.md
(一键领券透传 pricebot-backend, 唯一需 JWT 鉴权的业务接口)
- 更新 后端技术实现.md: 业务补"领券透传"块、目录补 coupon.py、新增 coupon/step 节、
配置补 PRICEBOT_*、接口索引改指向 docs/api/
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-27 12:07:54 +08:00 |
|