From d82e09e61b2355c536488b2897d3bad6622764db Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 23 Feb 2024 15:50:54 +0900 Subject: [PATCH] =?UTF-8?q?setTimestamp(..)=20=EC=A4=91=20insert=20?= =?UTF-8?q?=EB=B6=80=EB=B6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/foundation/data/paging/MapperSupport.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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: