INSERT INTO permission (id, permission_code, permission_name, module)
VALUES
    (1041, 'tenant.manage', '租户管理', 'system')
ON DUPLICATE KEY UPDATE permission_name = VALUES(permission_name), module = VALUES(module);

INSERT INTO role_permission (id, tenant_id, role_id, permission_id)
VALUES
    (42, 1, 101, 1041)
ON DUPLICATE KEY UPDATE permission_id = VALUES(permission_id);
