In MyBatis, you mark the places where parameters should be inserted into your SQL like so:
SELECT * FROM Person WHERE id = #{id}
the bind include inside the if
SELECT A.ID_VIAJE ID, A.NOMBRE, A.DESCRIPCION, A.FINICIO, A.FFIN, A.LOGO, A.URL, A.ID_CLIENTE IDCLIENTE, B.NOMBRE CLIENTE FROM VIAJE A INNER JOIN CLIENTE B ON (A.ID_CLIENTE = B.ID_CLIENTE) WHERE A.ESTATUS = 1 AND A.NOMBRE LIKE #{pattern}