Example #1
0
 @Before(UCodeInterceptor.class)
 public void restore() {
   BigInteger id = getParaToBigInteger("id");
   Comment c = CommentQuery.findById(id);
   if (c != null && c.isDelete()) {
     c.setStatus(Content.STATUS_DRAFT);
     c.saveOrUpdate();
     renderAjaxResultForSuccess("success");
   } else {
     renderAjaxResultForError("restore error!");
   }
 }