コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }