mybatis遇到日期类型数据时String到date的转化
实体里面是String,但是表里是date,临时转化
<update id="updateInventory" parameterType="com.docc.model.Inventory">
update BUS_INVENTORY
set orgcode = #{orgcode,jdbcType=VARCHAR},
reportdate = #{reportdate,jdbcType=CHAR},
checkname = '${checkname}',
archivetime = to_date(#{archivetime,jdbcType=DATE},'yyyy-mm-dd')
where id = #{id,jdbcType=DECIMAL}
</update>