mybatis模糊查询

  今天遇到一个模糊查询的问题,需求是:根据传入的时间查询当天的所有数据,解决办法是使用$或者contact,具体sql模拟如下:

select * from table_name where create_time like concat(#{createTime},'%');
select * from table_name where create_time like concat('%',#{createTime},'%');
select * from table_name where create_time like "%${createTime}%";
select * from table_name where create_time like "${createTime}%";

 

 

  

posted @ 2018-12-27 17:29  技术博客这里开始  Views(201)  Comments(0Edit  收藏  举报