alter table obpm2.identity_user add column we_chat_json json;

UPDATE obpm2.identity_user a
    JOIN obpm2.identity_principals c ON c.identity_user_id = a.id
    JOIN obpm2.identity_wechat d ON d.id = c.id
    SET a.we_chat_json = concat(
        '{"openId":"',
        d.open_id,
        '","nicky":"',
        d.nicky,
        '","unionId":"',
        d.union_id,
        '"}'
        );