Files
ray zhou f71a5c59af ok
2026-05-29 11:21:40 +08:00

8 lines
10 KiB
JSON
Raw Permalink 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.

{"role":"user","message":{"content":[{"type":"text","text":"<user_query>\n请在仓库 /Users/ray/Documents/project/www/ray/slot-wallet 里做中等深入只读探索,目标:找出 bonus/deposit 任务、打码进度、任务详情 在 PRD/README/doc 中的定义与字段口径。重点查看 README.md、doc/wallet.md 及相关文档。请返回1) 关键规则与字段定义2) 建议返回给玩家的最小字段集合3) 涉及的文件路径列表。\n</user_query>"}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"正在搜索并阅读 PRD、README 及相关文档中关于 bonus/deposit 任务、打码与任务详情的定义。\n\n[REDACTED]"},{"type":"tool_use","name":"updateCurrentStep","input":{"current_step":"Exploring PRD and wallet docs","final_summary":"placeholder","completed_subtitle":"placeholder"}},{"type":"tool_use","name":"Grep","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc","pattern":"任务|打码|bonus|deposit|wager","glob":"*.md","-i":true}},{"type":"tool_use","name":"Grep","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/README.md","pattern":"任务|打码|bonus|deposit","-i":true}}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"[REDACTED]"},{"type":"tool_use","name":"Read","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md","offset":245,"limit":200}},{"type":"tool_use","name":"Read","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/README.md","offset":125,"limit":120}},{"type":"tool_use","name":"Grep","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md","pattern":"wager_task|effective|required_wager|current_wager"}}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"[REDACTED]"},{"type":"tool_use","name":"Read","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md","limit":160,"offset":480}},{"type":"tool_use","name":"Read","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md","limit":130,"offset":580}},{"type":"tool_use","name":"Read","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md","limit":120,"offset":680}},{"type":"tool_use","name":"Read","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md","limit":120,"offset":900}}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"[REDACTED]"},{"type":"tool_use","name":"Read","input":{"limit":230,"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md"}},{"type":"tool_use","name":"Read","input":{"limit":100,"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/win.md","offset":1}}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"[REDACTED]"},{"type":"tool_use","name":"Grep","input":{"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md","pattern":"^## 21"}},{"type":"tool_use","name":"Read","input":{"limit":120,"offset":798,"path":"/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md"}}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"[REDACTED]"},{"type":"tool_use","name":"updateCurrentStep","input":{"completed_subtitle":"Summarized PRD wallet task fields","current_step":"Gathered doc/wallet and README refs","final_summary":"已从 `doc/wallet.md`(含 §7 任务体系、§6 Lot 字段、§18§19、§21 前端展示、附录 DDL、关联的 `doc/win.md`(任务完成与 Round 结算时点)以及 `README.md` §6 / 资金规则索引中整理了 Bonus/Deposit 任务、打码进度与对用户暴露字段的建议口径;文末列出全部相关文档路径。"}}]}}
{"role":"assistant","message":{"content":[{"type":"text","text":"以下为基于仓库文档的归纳(**真账口径以 Lot + 流水为准**,聚合钱包为展示)。\n\n---\n\n### 1) 关键规则与字段口径\n\n**任务边界与推进(与设计原则一致)**\n\n- **Deposit Unlock Task**:每笔充值一条;**仅用对应 Locked Deposit Lot 出资产生的「有效投注」**推进该笔任务。\n- **Bonus Conversion Task**:每笔奖励领取一条;**仅用该 Bonus Lot 自己出资的有效投注**推进;不同 Bonus Lot **不共享、不合并、不互补**进度。\n- **Withdrawable 出资下注****不推进**任何 Deposit / Bonus 任务。\n- **Deposit 与 Bonus 任务独立**:互不影响对方的打码进度。\n- **Deposit 任务顺序**:按充值顺序(`created_at ASC, id ASC`);当前笔未完成前**不推进后续**;未到顺序的 Deposit Lot 可处于 **`Waiting`**,获准后为 **`Active`** 才参与消耗与打码累积(详见 PRD。\n- **过期**Deposit 任务 **不过期**Bonus 转化任务 **默认不过期**`expires_at` 常为 NULL。\n- **释放/转化金额**:完成时转出的是 Lot **当前 `remaining_amount`**,不是 `original_amount`。\n- **与 Round 的关系**:提现展示上的「任务是否走完」与用户端进度有关,但 **Bonus 转可提现、`PlayedOut` 等终态判断在 Round Final Settlement 之后**;存在 **`PendingConversion`**:流水门槛已达成,**等本局 Round 最终结算**后再落账转化/解锁。\n\n**打码进度(字段含义)**\n\n- 落在 **`wallet_fund_lot`** 思路下PRD §18.2、附录 DDL\n - **`required_wager`**:所需 **有效投注额**(整数,与全文金额最小单位一致,见 §16.1)。\n - **`current_wager`****当前已累计有效投注额**。\n - **`wager_multiplier`**打码倍数DDL 中为 `decimal`),与后台配置 **`deposit_wager_multiplier` / `bonus_wager_multiplier`**、**`game_wager_contribution_rate`**有效投注折算等产品配置项相关联§22。\n - **`wallet_bet_funding`** 上的 **`bet_amount` / `valid_bet_amount`**:单笔出资金额与 **计入任务的「有效投注」**拆分§18.3);混合资金来源时按比例/规则拆分后,各 Lot 各自累加自身任务进度§10§11 及示例中的「有效投注系数」)。\n- **进度判定**Bonus 转化的流水门槛示例为 **`current_wager >= required_wager`**(与 §13、`doc/win.md` 一致),且须满足 Round 结算、 Lot 仍有剩余等与状态相关的条件。\n\n**任务 / Lot 状态Fund Lot Status对用户解释重要**\n\n- **1 Waiting**:排队未轮到,**不参与**下注消耗与任务进度累积。\n- **2 Active**:进行中,按规则消耗并推进任务。\n- **3 PendingConversion**:已达流水门槛,**等 Round 最终结算**后再做解锁/转化落账。\n- **4 Completed**:已完成。\n- **5 PlayedOut****仅 Bonus** — 用完未完成转化。\n- **6 Cancelled**:如用户取消 Bonus。\n- **7 Reversed**:冲正。\n\nDeposit 任务状态表还带 **Cancelled / Reversed** 等§7.1Bonus 另含 **PlayedOut**§7.2)。\n\n**对用户可见的四类聚合余额(与任务关系)**\n\n- **`deposit_balance`**Locked Deposit玩可推进 Deposit 解锁任务。\n- **`frozen_bonus`**Bonus Credits玩可推进对应 Bonus 转化任务。\n- **`withdraw_balance`**:可提现;**未完成任务不作账户级提现锁定**§8.3)。\n- PRD §21 建议在 UI 上对 Locked Deposit / Bonus 配简短说明文案。\n\n---\n\n### 2) 建议返回给玩家的「最小」字段集合\n\n在不落库冗余、且不暴露风控/内部枚举细节的前提下,单条任务(通常对应一笔 **Lot**)建议最少包含:\n\n| 用途 | 建议字段 |\n|------|----------|\n| 区分任务类型 | **任务类型**(充值解锁 vs 奖励转化 ↔ `lot_type` |\n| 列表/详情主键 | **稳定外部 id**(如 `lot_no` 或服务端映射后的 `task_id`,勿直接堆内部自增若无治理) |\n| 打码进度 | **`current_wager`、`required_wager`**(同源整数单位);可选展示 **百分比/进度条**(由二者算出,不必多传) |\n| 与用户利益直接相关的金额 | **`remaining_amount`**(完成后可转可提现的金额口径) |\n| 状态理解与文案 | **用户态状态**:至少能区分进行中 / **流水已满待局结算PendingConversion** / 已完成 / **PlayedOut** / 已取消(映射自 §19.2 + §21.4 |\n| 过期与叙事 | **`expires_at`**Bonus 常为 null若有政策再展示以及可选 **来源展示名**(由 `source_type` + 运营配置映射,不必裸传 `source_id` |\n\n**钱包首页层级**仍可只暴露聚合:**`withdraw_balance`、`deposit_balance`、`frozen_bonus`、`withdraw_lock`(若在途提现)**,与 §5、§21.1、README §6.2 对齐;**任务明细**再在独立接口用上图最小集合列出多条 Lot。\n\n---\n\n### 3) 涉及的文件路径(绝对路径)\n\n- `/Users/ray/Documents/project/www/ray/slot-wallet/doc/wallet.md` — 主 PRD任务定义§7、Lot 与打码字段§6、§18.2、状态§19.2)、转化/PlayedOut§13§14、前端文案§21、附录 DDL、`wallet_bet_funding`。\n- `/Users/ray/Documents/project/www/ray/slot-wallet/doc/win.md` — 下注/最终结算时对 **`current_wager` 推进**与 **Round 之后才做任务后置与 Bonus 转化** 的时序。\n- `/Users/ray/Documents/project/www/ray/slot-wallet/README.md` — 聚合字段与 Lot/Funding/Round **实现索引**(第 6 节等)。\n- `/Users/ray/Documents/project/www/ray/slot-wallet/.cursor/rules/slot-wallet-prd-and-money.mdc` — PRD **语义摘要**与代码入口指针(便于与实现对照)。\n\n**顺带提及(偏历史/运维 DDL非主 PRD 口径)**`/Users/ray/Documents/project/www/ray/slot-wallet/doc/feature_task.md`、`/Users/ray/Documents/project/www/ray/slot-wallet/doc/feature_task_2026_0311.md` 描述 **`wager_task`** 表调整;与 PRD 中 **`wallet_fund_lot` 承载打码** 的职责若并存,以实现与数据模型文档为准。\n\n---\n\n**摘要**Deposit/Bonus「任务」在 PRD 里与 **每笔 Lot 绑定**;打码进度口径是 **`required_wager` / `current_wager`(有效投注累计)**,并受 **Lot 状态、下注资金来源、Deposit 队列顺序、Round 最终结算** 约束;对用户最小宜给 **类型、进度两金额、剩余可转金额、可理解的状态** 加稳定 id。\n\n[REDACTED]"}]}}