public void preInsert() { String currentUser = BaseUtils.getCurrentUser(); Date currentDate = BaseUtils.getCurrentDate(); setCreateBy(currentUser); setCreateDate(currentDate); setUpdateBy(currentUser); setUpdateDate(currentDate); setStatus(getStatus() == null ? Status.NOMAL.getValue() : getStatus()); setVersion(1); setId(StringUtils.isEmpty(getId()) ? BaseUtils.getRandomId() : getId()); }
public void preUpdate() { setUpdateBy(BaseUtils.getCurrentUser()); setUpdateDate(BaseUtils.getCurrentDate()); }