diff --git a/src/main/java/cokr/xit/foundation/data/paging/MapperSupport.java b/src/main/java/cokr/xit/foundation/data/paging/MapperSupport.java index 4829249..7ea1b29 100644 --- a/src/main/java/cokr/xit/foundation/data/paging/MapperSupport.java +++ b/src/main/java/cokr/xit/foundation/data/paging/MapperSupport.java @@ -90,10 +90,11 @@ public class MapperSupport extends MybatisPlugin { String userID = currentUser().getId(); switch (sqlType) { case INSERT: - if (!isEmpty(entity.getCreatedBy())) return; - entity.setCreatedBy(userID); + if (isEmpty(entity.getCreatedBy())) { + entity.setCreatedBy(userID); + entity.setModifiedBy(userID); + } entity.setCreatedAt(now); - entity.setModifiedBy(userID); entity.setLastModified(now); break; case UPDATE: