feat(billing): add dual formulas, disable 10yuan gift, retry auto-renew
Memind CI / Test, build, and release guards (push) Successful in 3m43s

Turn off the low-balance 10 CNY signup bonus while keeping the 5 CNY
registration credit, split metering into independent formula A/B scopes,
and retry expired auto-renew subscriptions after recharge or hourly worker.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-22 08:45:43 +08:00
parent f57e080b49
commit 4d12ea438b
9 changed files with 474 additions and 164 deletions
+6
View File
@@ -583,6 +583,12 @@ export async function migrateSchema(pool) {
);
}
if (!(await columnExists(pool, 'h5_users', 'billing_formula'))) {
await pool.query(
`ALTER TABLE h5_users ADD COLUMN billing_formula ENUM('A','B') NOT NULL DEFAULT 'A' AFTER low_balance_gift_granted_at`,
);
}
if (!(await columnExists(pool, 'h5_user_sessions', 'goosed_node'))) {
await pool.query(
`ALTER TABLE h5_user_sessions ADD COLUMN goosed_node TINYINT UNSIGNED NOT NULL DEFAULT 0`,