用mybatis在 mysql 中保存字段精确到秒需要两个步骤。
1、现在mysql中将时间字段改为datetime 例如:alter table tablename add pay_date datetime comment '精确到秒的时间'
2、在sql语句中直接用now(). 例如: update tj_record set is_customerHandover ='1' and customer_handover_date = now() where id = #{record_id}
查看更多关于mysql保存当前时间精确到秒 - mysql数据库栏目 - 自的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did4759