<if test="matchResult != null and '' != matchResult "> <choose> <when test="'true'.toString() == matchResult"> and match_num > 0 </when> <when test="'false'.toString() == matchResult"> and match_num < 1 </when> </choose> </if>