Files
wzdj/new/wz-api/scripts/mysql-seed-wz-document-user.sql

18 lines
767 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 玩值管理端 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);