mybatisplus自动生成毫秒级时间
时间: 2023-09-19 11:09:34 浏览: 213
MyBatis-Plus可以通过自动填充功能来实现毫秒级时间的自动生成。在实体类中,通过注解`@TableField(fill = FieldFill.INSERT)`来指定插入时需要自动填充的字段。其中`createTime`和`updateTime`字段可以使用`Date`类型来存储毫秒级时间戳。在每次插入或更新数据时,MyBatis-Plus会自动将当前时间戳填充到这两个字段中。这样就实现了毫秒级时间的自动生成。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [易语言毫秒级时间](https://download.csdn.net/download/weixin_38682279/12738233)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [mybatisplus实现自动填充 时间](https://blog.csdn.net/qq_45432276/article/details/132106049)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文