r.`registered_at` >= #{req.beginRegisteredAt} AND r.`registered_at` <= #{req.endRegisteredAt} AND r.`deleted_at` IS NULL AND r.`customer_id` = #{req.customerId} AND r.`registration_event_id` = #{req.registrationEventId} AND r.`registration_event_id` IN #{registrationEventId} AND ( c.`code` LIKE CONCAT('%', #{req.keyword}, '%') OR c.`name` LIKE CONCAT('%', #{req.keyword}, '%') OR e.`name` LIKE CONCAT('%', #{req.keyword}, '%') OR r.`remark` LIKE CONCAT('%', #{req.keyword}, '%') OR u.`name` LIKE CONCAT('%', #{req.keyword}, '%') OR u.`nick` LIKE CONCAT('%', #{req.keyword}, '%') OR r.`operator_user_id` LIKE CONCAT('%', #{req.keyword}, '%') ) FROM `gao_registration_event_record` r LEFT JOIN `gao_customer` c ON r.`customer_id` = c.`id` LEFT JOIN `gao_registration_event` e ON r.`registration_event_id` = e.`id` LEFT JOIN `user` u ON r.`operator_user_id` = u.`id`