MyBatis XML 常用写法:使用 like 关键字【整理 + 转载】
场景
方法1:concat
1 | <where> |
方法2:${}
1 | <if test="examTypeName!=null and examTypeName!=''"> |
方法3:#{}
1 | <if test="examTypeName!=null and examTypeName!=''"> |
1 | <where> |
1 | <if test="examTypeName!=null and examTypeName!=''"> |
1 | <if test="examTypeName!=null and examTypeName!=''"> |