From 43b56640ef3c0beb3fc291a09bcd5eea4ee2ba56 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 23 Feb 2024 15:42:39 +0900 Subject: [PATCH] =?UTF-8?q?setTimestamp(..)=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/foundation/data/paging/MapperSupport.java | 3 +++ 1 file changed, 3 insertions(+) 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 cfc40fe..4829249 100644 --- a/src/main/java/cokr/xit/foundation/data/paging/MapperSupport.java +++ b/src/main/java/cokr/xit/foundation/data/paging/MapperSupport.java @@ -90,16 +90,19 @@ public class MapperSupport extends MybatisPlugin { String userID = currentUser().getId(); switch (sqlType) { case INSERT: + if (!isEmpty(entity.getCreatedBy())) return; entity.setCreatedBy(userID); entity.setCreatedAt(now); entity.setModifiedBy(userID); entity.setLastModified(now); break; case UPDATE: + if (!isEmpty(entity.getModifiedBy())) return; entity.setModifiedBy(userID); entity.setLastModified(now); break; case DELETE: + if (!isEmpty(entity.getRemovedBy())) return; entity.setRemovedBy(userID); entity.setRemovedAt(now); entity.setUseYN("N");