JPA配置实体时 insertable = false, updatable = false
@Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss", width = 20) @Column(name = "created_time", insertable = false, columnDefinition = "timestamp default current_timestamp") @Temporal(TemporalType.TIMESTAMP) @Generated(GenerationTime.INSERT) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") protected Date createdTime;
@Excel(name = "修改时间", format = "yyyy-MM-dd HH:mm:ss", width = 20) @Column(name = "updated_time") @org.hibernate.annotations.UpdateTimestamp @Temporal(TemporalType.TIMESTAMP) protected Date updatedTime;