错误的写法
<if test="room != null and room =='02'">
and t.room = '2'
</if>
正确的写法
<if test='room != null and room =="02"'>
and t.room = '2'
</if>
注意 <if test= 'room != null and room == "02 " '>
单双引号的使用!
错误的写法
<if test="room != null and room =='02'">
and t.room = '2'
</if>
<if test='room != null and room =="02"'>
and t.room = '2'
</if>
单双引号的使用!