mybatis的日期格式化处理和like模糊查询

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_39704078/article/details/83341367

1.

left(t.`create_time`,19) AS createtime

此方式在Java里用String接收,19是截取字符串

2.

DATE_FORMAT(t.create_time,'%Y-%m-%d %H:%m:%s') AS createtime

3.WHERE 1=1  AND h.`title` LIKE CONCAT('%',#{title},'%')

猜你喜欢

转载自blog.csdn.net/weixin_39704078/article/details/83341367