♻️ Refactoring code.优化id足够长时返回前端可能会造成精度丢失的问题

This commit is contained in:
lishangbu 2020-05-16 07:42:37 +08:00
parent 7860d648ab
commit 9d62eafb2f

View File

@ -21,6 +21,8 @@ package com.pig4cloud.pig.admin.api.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -46,6 +48,7 @@ public class SysLog implements Serializable {
*/
@TableId(value = "id", type = IdType.AUTO)
@ApiModelProperty(value = "日志编号")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 日志类型