Files
bl/help/给经验池增加.sql

9 lines
267 B
Go
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.

UPDATE "player_info"
SET data = jsonb_set(
data,
'{exp_pool}',
-- 直接复用查询中的计算逻辑确保结果一致
to_jsonb(COALESCE((data->>'exp_pool')::int, 0) + 50000000),
true -- 字段不存在时自动初始化为10
)
WHERE player_id = 10001;