移除全局日期格式配置,优化Date类型格式
This commit is contained in:
parent
1b43406d2d
commit
b444f72d9e
|
@ -82,7 +82,6 @@ public class CoreAutoConfiguration{
|
|||
// 设置fastjson的序列化参数:禁用循环依赖检测,数据兼容浏览器端(避免JS端Long精度丢失问题)
|
||||
fastJsonConfig.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect,
|
||||
SerializerFeature.BrowserCompatible);
|
||||
fastJsonConfig.setDateFormat(D.FORMAT_DATETIME_Y4MDHM);
|
||||
converter.setFastJsonConfig(fastJsonConfig);
|
||||
|
||||
HttpMessageConverter<?> httpMsgConverter = converter;
|
||||
|
|
|
@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
|||
import com.diboot.core.config.Cons;
|
||||
import com.diboot.core.util.BeanUtils;
|
||||
import com.diboot.core.util.ContextHelper;
|
||||
import com.diboot.core.util.D;
|
||||
import com.diboot.core.util.JSON;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
@ -41,13 +42,13 @@ import java.util.Map;
|
|||
public abstract class BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 10203L;
|
||||
|
||||
/***
|
||||
/**
|
||||
* 默认主键字段id,类型为Long型自增,转json时转换为String
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/***
|
||||
/**
|
||||
* 默认逻辑删除标记,is_deleted=0有效
|
||||
*/
|
||||
@TableLogic
|
||||
|
@ -55,9 +56,10 @@ public abstract class BaseEntity implements Serializable {
|
|||
@TableField(Cons.COLUMN_IS_DELETED)
|
||||
private boolean deleted = false;
|
||||
|
||||
/***
|
||||
/**
|
||||
* 默认记录创建时间字段,新建时由数据库赋值
|
||||
*/
|
||||
@JSONField(format = D.FORMAT_DATETIME_Y4MDHMS)
|
||||
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private Date createTime;
|
||||
|
||||
|
|
Loading…
Reference in New Issue