设计一个合理的适合自己项目的baseEntity可以大幅度的减少代码的行数,使得代码更加优雅
package com.**.t31.core.common; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @Data public class baseEntity implements Serializable { @TableId(value = "id",type = IdType.AUTO) private String id; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String createTime; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String updateTime; @TableField(exist = false) private String pageNum; @TableField(exist = false) private String pageSize; }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)