Fix duplicate session billing and align pricing with DeepSeek ×3.
Serialize billSessionUsage with row locks, expose rates on recharge, add compensation script and admin usage views. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -354,6 +354,7 @@ CREATE TABLE IF NOT EXISTS h5_usage_records (
|
||||
balance_after_cents BIGINT NOT NULL,
|
||||
created_at BIGINT NOT NULL,
|
||||
KEY idx_h5_usage_user_time (user_id, created_at),
|
||||
KEY idx_h5_usage_created (created_at),
|
||||
CONSTRAINT fk_h5_usage_user FOREIGN KEY (user_id) REFERENCES h5_users(id) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user