mybatis中条件表达式字符串用''单引号不能直接比较,需要加toString()

<if test="param != null and param != 'hello'.toString()" >

或者用""双引号

<if test='param != null and param != "hello" ' >