18 lines
767 B
SQL
18 lines
767 B
SQL
-- 玩值管理端 GET /api/admin/wz/users:数据来自 MySQL `wz_documents`,其中 coll = 'users',
|
||
-- body 为 JSON(与旧 Mongo 集合 users 迁移策略一致)。
|
||
-- 在云库 souldev(或你的 DB)执行;表须已存在(SKIP_AUTO_MIGRATE=1 时启动会尝试 AutoMigrate WzDocument)。
|
||
|
||
USE souldev;
|
||
|
||
INSERT INTO wz_documents (`coll`, `ext_id`, `body`, `created_at`, `updated_at`)
|
||
VALUES (
|
||
'users',
|
||
'localdevuser000000000001',
|
||
CAST('{"name":"列表练习用户","phone":"13900139000","status":"active","isVip":false,"balance":88,"createdAt":"2026-04-29T00:00:00Z","updatedAt":"2026-04-29T00:00:00Z"}' AS JSON),
|
||
UTC_TIMESTAMP(3),
|
||
UTC_TIMESTAMP(3)
|
||
)
|
||
ON DUPLICATE KEY UPDATE
|
||
`body` = VALUES(`body`),
|
||
`updated_at` = UTC_TIMESTAMP(3);
|