|
|
|
@ -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");
|
|
|
|
|