您的位置:首页 > 其它

MyBatis Like 拼接

2016-03-03 10:21 295 查看
我在公司开发中摘取的一段例子,完全有效

<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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mybatis Like拼接