1.优化ws游戏对局推送消息-小奖为bet.win

This commit is contained in:
2026-05-26 12:31:33 +08:00
parent 7edc3ec010
commit ae7af24565
5 changed files with 101 additions and 17 deletions

View File

@@ -791,7 +791,7 @@
- 订阅连胜/赔率(仅当前玩家):`{"action":"subscribe","topics":["user.streak","wallet.changed","bet.accepted"]}`
- 订阅资金流:`{"action":"subscribe","topics":["bet.accepted","wallet.changed"]}`
- 订阅托管流:`{"action":"subscribe","topics":["auto.spin.progress","wallet.changed"]}`
- 移动端推荐合并订阅:`period.tick``user.streak``wallet.changed``bet.accepted``period.opened`
- 移动端推荐合并订阅:`period.tick``bet.win``user.streak``wallet.changed``bet.accepted``period.opened``period.payout``jackpot.hit`
#### 7.1.1 消息协议字段定义(联调口径)
@@ -833,7 +833,13 @@
- `user.streak`:每期结算更新用户连胜后按用户推送(未中奖也会推送,`current_streak` 可能归零)。
- `admin.live.snapshot`**每秒一次**(后台实时对局页全量快照;不受派彩静默期影响)。
- `period.opened` / `period.payout` / `admin.live.opened`:按开奖流程阶段触发(事件触发型,非固定频率)。
- `wallet.changed`:仅在余额发生变更时推送(如下注扣款、充值入账、派彩入账)。
- `wallet.changed`:仅在余额发生变更时推送(如下注扣款、充值入账、派彩入账)。派彩时 `biz_type=payout`,并带 `amount`(本次派彩金额)、`period_no``period_id``result_number`(若有)。
- **`bet.win`(小奖)**:本期中奖且**非大奖档**`streak_win_reward``is_jackpot=false`)时,按用户聚合推送一帧;用于弹窗/横幅,**比 `wallet.changed` 更适合做「你中了小奖」展示**。
- `data.user_id` / `data.period_id` / `data.period_no` / `data.result_number`
- `data.total_win`:本期该用户小奖派彩合计
- `data.balance_after`:派彩后余额
- `data.bets[]``{ bet_id, win_amount }` 明细
- `data.is_jackpot`:固定 `false`
- `jackpot.hit`**仅在本期存在中大奖命中用户时推送**;无命中不推送。
- **载荷字段**`period_id` / `period_no` / `result_number` / `hits[]` / `server_time`
- `hits[]` 数组每项字段: