修复微信扫码区服识别

This commit is contained in:
yml2213
2026-08-17 20:30:15 +08:00
parent 79ced2d121
commit 0bc6cf9f46
3 changed files with 46 additions and 2 deletions
@@ -0,0 +1,21 @@
-- +goose Up
-- 修正历史外部上传中以 VX/WX 表示微信扫码、但被默认归类为 QQ 的账号。
UPDATE game_accounts AS a
JOIN rental_listings AS l ON l.account_id = a.id
SET a.server_region = '微信'
WHERE a.server_region = 'QQ'
AND EXISTS (
SELECT 1
FROM listing_uploads AS lu
WHERE lu.listing_id = l.id
)
AND (
a.login_platform LIKE '%微信%'
OR LOWER(TRIM(a.login_platform)) LIKE 'vx%'
OR LOWER(TRIM(a.login_platform)) LIKE 'wx%'
);
-- +goose Down
-- 此数据修复不可逆,避免将已修正的微信账号错误回退为 QQ。