MyBatis plus

一、like mapper中防注入写法

传统的是 

su.company like '%${aaa}%'
改成
<if test="query.company!=null">
<bind name="itemName" value="'%'+query.company+'%'"/>
and su.company like #{itemName}
</if>
posted @ 2022-12-10 18:06  阿旭92312  阅读(23)  评论(0编辑  收藏  举报