错误写法:
<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>