gamer147
559a170957
feat(item-purchase): /item_purchase/{info,purchase} + catalog
Schema: ItemPurchaseCatalogEntry (single table). Per-viewer quota tracked
via existing ViewerEventCounter keyed by "item_purchase:<id>" with period
JstPeriod.MonthKey when IsMonthlyReset else AllTime.
Controller:
- /info returns catalog + per-period rest (server-computed
max(0, PurchaseLimit - counter)) + user_card_pack_ticket_list (every
Items.Type==2 row joined to viewer count, zeros included — client
unconditionally UpdateItemNum's each entry).
- /purchase: sold_out check before currency check (no counter increment
on currency failure), inline TryDebit covers RedEther/Crystal/Rupy/Item
with post-state-total reward_list entry, grant via RewardGrantService.
Request `rest` accepted but ignored (server counter is canonical).
Importer mirrors PaymentItemImporter shape — idempotent find-or-create,
seed-missing rows preserved. 3 entries from the prod capture.
486 tests pass (was 476; +10 item_purchase tests).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 22:41:02 -04:00
..
2026-05-27 10:41:49 -04:00
2026-05-27 00:00:24 -04:00
2026-05-27 10:30:29 -04:00
2026-05-27 14:11:47 -04:00
2026-05-27 10:35:40 -04:00
2026-05-27 22:41:02 -04:00
2026-05-27 22:41:02 -04:00
2026-05-25 19:07:49 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 19:57:34 -04:00
2026-05-26 22:49:30 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 19:57:34 -04:00
2026-05-24 21:13:15 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 18:14:42 -04:00
2026-05-24 02:03:13 -04:00
2026-05-24 02:03:13 -04:00
2026-05-24 02:03:13 -04:00
2026-05-24 02:03:13 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-24 02:03:13 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 15:47:23 -04:00
2024-09-12 00:35:31 -04:00
2026-05-23 19:57:34 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-25 12:03:47 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-24 21:13:15 -04:00
2026-05-26 10:01:37 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 15:47:23 -04:00
2026-05-23 18:14:42 -04:00
2026-05-23 15:47:23 -04:00