1.1 使用toString <if test="number != null and number != '*'.toString()"> 1.2 更换引号顺序 引起符号不符合条件的原因在于’'和""是不同的含义, 只需要将符号顺序改变即可: <if test='number != null and number != "*"'>