示例#1
0
  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());
  }
示例#2
0
 public void preUpdate() {
   setUpdateBy(BaseUtils.getCurrentUser());
   setUpdateDate(BaseUtils.getCurrentDate());
 }