<!-- mybatis -->
<where>
    <if test="varName != '' and varName != null" >
         var_name like '%${varName}%'
    </if>
</where>

  

//node  变量
 if (data.varName && data.varName != '') {
          sql += " where var_name like '%"+data.varName+"%'";
    }