当bind变量为NULL时,以下代码出现问题:
<bind name="recipientName" value="'%'+recipientName+'%'"/>
当绑定变量为null时,如何处理MyBatis中的Like运算符?
答案 0 :(得分:0)
<if test = "recipientName != null">
<bind name="recipientName" value="'%'+recipientName+'%'"/>
</if> resolved the issue.