CREATE TRIGGER update_invoice_complex AFTER UPDATE ON t_sfi_inter_invoice FOR EACH ROW BEGIN INSERT INTO t_sfi_inter_bus_complex (TABLE_NAME,OPER_TIME, OPERATION_TYPE, OLD_OBJECT, NEW_OBJECT) VALUES ('t_sfi_inter_invoice',NOW(), 'update', JSON_OBJECT('id', OLD.ID, 'invoice_no', OLD.INVOICE_NO, 'sum', OLD.SUM, 'fact_sum', OLD.FACT_SUM, 'status', OLD.STATUS, 'business_id', OLD.BUSINESS_ID, 'reinvoice', OLD.REINVOICE, 'is_printed', OLD.IS_PRINTED, 'print_user_id', OLD.PRINT_USER_ID, 'print_user_name', OLD.PRINT_USER_NAME, 'print_date', OLD.PRINT_DATE, 'invoice_type', OLD.INVOICE_TYPE, 'invoice_status', OLD.INVOICE_STATUS, 'tomb_certificate', OLD.TOMB_CERTIFICATE) , JSON_OBJECT('id', NEW.ID, 'invoice_no', NEW.INVOICE_NO, 'sum', NEW.SUM, 'fact_sum', NEW.FACT_SUM, 'status', NEW.STATUS, 'business_id', NEW.BUSINESS_ID, 'reinvoice', NEW.REINVOICE, 'is_printed', NEW.IS_PRINTED, 'print_user_id', NEW.PRINT_USER_ID, 'print_user_name', NEW.PRINT_USER_NAME, 'print_date', NEW.PRINT_DATE, 'invoice_type', NEW.INVOICE_TYPE, 'invoice_status', NEW.INVOICE_STATUS, 'tomb_certificate', NEW.TOMB_CERTIFICATE)); END;优化一下