Welcome
Sign in to start your session
Login
Login
[app info]
Brief app info: ENV: [DEV] commitId: db65a3e90ec04127f8823b402c9199c5f3a874ec branch: develop build date: 2026-08-21T08:54:11Z build version: 2026.08.06.1-SNAPSHOT commit message: #38030 Split the rescue trigger into a ratio event and a decision processor Reworked after the discussion with Rodion. The single processor that both watched bets and decided on the bonus is now two, with a Kafka message between them, so the measurement is reusable by any future rule and not welded to this one promotion. GameActionMsgCashinRemainingRatioProcessor is the measuring half. On a settled round it publishes CashinRemainingOnRealBalanceRatioEventMsg with the real balance, the deposits sum and count, and the balance expressed as a percentage of everything the player has cashed in. It publishes unconditionally - the event describes the player, not the promotion, so gating it on whether a promotion happens to exist would make it useless to the next consumer. CashinRemainingOnRealBalanceRatioMsgProcessor is the deciding half: it matches the event against active INSTANT_CLAIMABLE promotions, refuses players who already received this promotion type, and checks the deposit count and the threshold. It reads everything else from the event, so the decision costs two queries instead of the seven the old processor needed on every bet. Two defects in the previous implementation are fixed on the way. The trigger listened to MARKETING_PLAYER_BET only. A round closes on whichever provider call carries finish=true, which for most slots is the win call, so for those games the bet event always arrived with the round still open, the "no unsettled bets" guard vetoed itself, and the settlement event that would have released it was never consumed - the feature was simply dead there, and alive on games that close on the bet. Both message types are handled now. The balance came from a query; it now comes from balanceAfter, which the event already carries, and the deposits count, sum and first-deposit date arrive in a single aggregate instead of two round trips. The threshold became an either/or. A promotion sets one absolute amount per currency, as before, or a single percentage of the deposits sum, which is currency-independent and drops the whole per-currency table. Exactly one of the two must be present; both sides validate it, and the admin form switches between them with the per-currency column hidden in percent mode. Defaults to amounts so existing promotions keep behaving as they do. The cashback base is now the deposits sum from the event rather than a separately fetched first deposit. With the deposit-count condition set to one these are the same number; if an operator ever configures a higher count, the percentage applies to the whole cashed-in sum, which is the reading that generalises. Per review: Lombok everywhere, @Builder on the three message constructors (on the constructors, not the classes - they call super with the message type) and on both promotion views, no hand-written accessors, no comments. Gates: marketing-subsystem 49, ngp-online-admin 86, online-commons 13, online-integration 19, marketing-commons 2 - all green, no failures; checkstyle clean on the touched files. UPTIME: 0d 1h 30m 21s Git log: a6d54... | 2026-08-20T20:54:59+03:00 | Rodion | #38170 Phase 2: admin cohort report IT: AdminCo... 75f70... | 2026-08-20T19:15:41+03:00 | Rodion | #38170 Phase 2: admin marketing-subsystem HTTP ... 44e4a... | 2026-08-20T17:18:30+03:00 | Rodion | #38190 Add Remember-Me implementation plan (doc... 95c0c... | 2026-08-20T15:36:47+03:00 | Rodion | #38170 Fix CustomerIoComposerKafkaITTest fresh-... f2fef... | 2026-08-20T15:05:44+03:00 | Rodion | #38192 Fix supported-locale removal in admin ga... 064c9... | 2026-08-20T14:56:22+03:00 | Rodion | #38193 Fix the admin promo-list date filters br... da082... | 2026-08-20T14:49:58+03:00 | Rodion | #38170 Phase 2: admin promo-list Criteria query... ba3d9... | 2026-08-20T14:33:05+03:00 | Rodion | #38170 Test-properties hygiene: migrate every E... 119c0... | 2026-08-20T14:09:24+03:00 | Rodion | #38170 Phase 2: admin game-publisher service IT... c6192... | 2026-08-20T13:56:25+03:00 | Rodion | #38170 Phase 2: admin player-disabling service ...
copy to clipboard