优化时间填充

This commit is contained in:
zhouhao
2022-04-21 13:45:51 +08:00
parent f361f0c1cb
commit 69ac98c985

View File

@@ -76,6 +76,8 @@ public class CreatorEventListener implements EventListener {
if (ObjectUtils.isEmpty(e.getCreatorId())) {
e.setCreatorId(auth.getUser().getId());
e.setCreatorName(auth.getUser().getName());
}
if (e.getCreateTime() == null) {
e.setCreateTimeNow();
}
@@ -85,6 +87,8 @@ public class CreatorEventListener implements EventListener {
if (ObjectUtils.isEmpty(e.getModifierId())) {
e.setModifierId(auth.getUser().getId());
e.setModifierName(auth.getUser().getName());
}
if (e.getModifyTime() == null) {
e.setModifyTimeNow();
}
}