diff --git a/internal/storage/aggregate.go b/internal/storage/aggregate.go index 05cb261..af55faa 100644 --- a/internal/storage/aggregate.go +++ b/internal/storage/aggregate.go @@ -102,7 +102,7 @@ INSERT INTO country_dashboard_daily_metric ( new_user_recharge, official_recharge, mifapay_recharge, google_recharge, dealer_recharge, salary_exchange, salary_transfer, gift_consume, lucky_gift_total_flow, lucky_gift_payout, game_total_flow, game_payout, refreshed_at -) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW()) +) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW()) ON DUPLICATE KEY UPDATE country_name = VALUES(country_name), new_user_recharge = new_user_recharge + VALUES(new_user_recharge), diff --git a/internal/storage/batch_sql.go b/internal/storage/batch_sql.go index 9386719..34933f7 100644 --- a/internal/storage/batch_sql.go +++ b/internal/storage/batch_sql.go @@ -13,7 +13,7 @@ INSERT INTO country_dashboard_daily_metric ( new_user_recharge, official_recharge, mifapay_recharge, google_recharge, dealer_recharge, salary_exchange, salary_transfer, gift_consume, lucky_gift_total_flow, lucky_gift_payout, game_total_flow, game_payout, refreshed_at -) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW()) +) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW()) ON DUPLICATE KEY UPDATE country_name = VALUES(country_name), new_user_recharge = new_user_recharge + VALUES(new_user_recharge),