INSERT INTO permission (id, permission_code, permission_name, module)
VALUES (20002, 'project.bind.executor_user', '绑定EXECUTOR项目人员', 'project')
ON DUPLICATE KEY UPDATE permission_name = VALUES(permission_name), module = VALUES(module);

INSERT INTO role_permission (id, tenant_id, role_id, permission_id)
SELECT 20002, 1, r.id, 20002
FROM role r
WHERE r.tenant_id = 1 AND r.role_code = 'TENANT_ADMIN'
ON DUPLICATE KEY UPDATE permission_id = VALUES(permission_id);
