public CmsGuestbook save(CmsGuestbook bean, CmsGuestbookExt ext, Integer ctgId, String ip) {
   bean.setCtg(cmsGuestbookCtgMng.findById(ctgId));
   bean.setIp(ip);
   bean.setCreateTime(new Timestamp(System.currentTimeMillis()));
   bean.init();
   dao.save(bean);
   cmsGuestbookExtMng.save(ext, bean);
   return bean;
 }
 private CmsGuestbook checkById(Integer id, CmsUser checkUser, Boolean checkStatus) {
   CmsGuestbook bean = findById(id);
   Updater<CmsGuestbook> updater = new Updater<CmsGuestbook>(bean);
   bean = dao.updateByUpdater(updater);
   if (checkStatus) {
     bean.setAdmin(checkUser);
   }
   bean.setChecked(checkStatus);
   return bean;
 }
 public CmsGuestbook update(CmsGuestbook bean, CmsGuestbookExt ext, Integer ctgId) {
   Updater<CmsGuestbook> updater = new Updater<CmsGuestbook>(bean);
   bean = dao.updateByUpdater(updater);
   bean.setCtg(cmsGuestbookCtgMng.findById(ctgId));
   cmsGuestbookExtMng.update(ext);
   return bean;
 }
 public CmsGuestbook save(
     CmsUser member,
     Integer siteId,
     Integer ctgId,
     String ip,
     String title,
     String content,
     String email,
     String phone,
     String qq) {
   CmsGuestbook guestbook = new CmsGuestbook();
   guestbook.setMember(member);
   guestbook.setSite(cmsSiteMng.findById(siteId));
   guestbook.setIp(ip);
   CmsGuestbookExt ext = new CmsGuestbookExt();
   ext.setTitle(title);
   ext.setContent(content);
   ext.setEmail(email);
   ext.setPhone(phone);
   ext.setQq(qq);
   return save(guestbook, ext, ctgId, ip);
 }