版权声明:本文为博主原创,转载请保留文章全部内容 https://blog.csdn.net/Lyj19910516/article/details/50786448
我在公司开发中摘取的一段例子,完全有效
<select id="strategy_get" resultType="map">
select * from strategy
where merchantid = #{merchantid}
<choose>
<when test="title != null and title != ''">
and title like concat(concat('%',#{title}),'%')
</when>
</choose>
</select>