1. <if test="matchResult != null and '' != matchResult ">
    2. <choose>
    3. <when test="'true'.toString() == matchResult">
    4. and match_num &gt; 0
    5. </when>
    6. <when test="'false'.toString() == matchResult">
    7. and match_num &lt; 1
    8. </when>
    9. </choose>
    10. </if>