错误写法:
<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>
错误写法:
<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>
转载于:https://www.cnblogs.com/boshen-hzb/p/10143625.html