myBatis中if test 字符串注意事项
错误写法:
<if test="userName == 'boshen'"> AND `USER_NAME` = #{userName} </if>
正确写法:
<if test='userName == "boshen"'> AND `USER_NAME` = #{userName} </if>
或
<if test="userName == 'boshen'.toString()"> AND `USER_NAME` = #{userName} </if>