-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto commit and push by cuilan on 2024-03-12 14:46:39
- Loading branch information
Showing
14 changed files
with
66 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
tom-mybatis-base/src/main/java/io/github/cuilan/tom/mybatisbase/entity/BaseIdEntity.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
tom-mybatis-base/src/main/java/io/github/cuilan/tom/mybatisbase/entity/BaseTimeEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package io.github.cuilan.tom.mybatisbase.entity; | ||
|
||
import io.github.cuilan.tom.mybatisbase.enums.Action; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 数据库实体基类 | ||
* | ||
* @author zhang.yan | ||
* @since 2021-10-27 | ||
*/ | ||
@Data | ||
public abstract class BaseTimeEntity implements Serializable { | ||
|
||
/** | ||
* 记录状态 | ||
*/ | ||
private Action action; | ||
|
||
/** | ||
* 记录修改时间 | ||
*/ | ||
private Long actionTime; | ||
|
||
/** | ||
* 记录创建时间 | ||
*/ | ||
private Long createTime; | ||
|
||
/** | ||
* 设置action参数 | ||
* | ||
* @param action action | ||
*/ | ||
public void setAction(Action action) { | ||
long now = System.currentTimeMillis(); | ||
if (Action.INIT == action) { | ||
this.createTime = now; | ||
} | ||
this.actionTime = now; | ||
this.action = action; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters