mybatis xml常用写法-使用like关键字【整理+转载】
需求:xml中需要在where中拼接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!=''"> |