setTimestamp(..) 중 insert 부분 수정

master
mjkhan21 9 months ago
parent 43b56640ef
commit d82e09e61b

@ -90,10 +90,11 @@ public class MapperSupport extends MybatisPlugin {
String userID = currentUser().getId(); String userID = currentUser().getId();
switch (sqlType) { switch (sqlType) {
case INSERT: case INSERT:
if (!isEmpty(entity.getCreatedBy())) return; if (isEmpty(entity.getCreatedBy())) {
entity.setCreatedBy(userID); entity.setCreatedBy(userID);
entity.setModifiedBy(userID);
}
entity.setCreatedAt(now); entity.setCreatedAt(now);
entity.setModifiedBy(userID);
entity.setLastModified(now); entity.setLastModified(now);
break; break;
case UPDATE: case UPDATE:

Loading…
Cancel
Save