Skip to content

Commit

Permalink
修改抽象父类的初始化工作
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx committed Jan 11, 2019
1 parent 308f1dc commit 54534d5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/java/org/yyx/domain/entity/AbsBaseEntity.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.yyx.domain.entity;

import org.yyx.util.string.UtilString;

import java.util.Date;

/**
Expand All @@ -18,7 +20,7 @@ public abstract class AbsBaseEntity implements BaseEntity {
/**
* 数据库表记录状态 0:正常(可用,可见) 1:不正常(不可用,不可见)
*/
private short status = 0;
private short status;
/**
* 数据库表记录创建时间
*/
Expand Down Expand Up @@ -63,4 +65,13 @@ public void setStatus(short status) {
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}

/**
* 初始化对象的方法
*/
public void init() {
this.pkField = UtilString.randomUUID();
this.gmtCreate = new Date();
this.status = 0;
}
}

0 comments on commit 54534d5

Please sign in to comment.