java Date的对象作为参数传入Mapper.xml里, 查询日期字段等于这个Date的记录, 没有记录被查到, 代码如下:
<select id="selectByDate" resultMap="productMap">
select * from product where create_date = #{date,jdbcType=DATE
</select>
<select id="selectByDate" resultMap="productMap">
select * from product where create_date = #{date}
</select>
试了下在MySQL里能直接用字符串查到
SELECT * FROM product WHERE create_date = '2019-10-10 00:00:00'
一直搜不到解决方法, 求助各位