Beispiel #1
0
 public CmsSite update(CmsSite bean, Integer uploadFtpId) {
   CmsSite entity = findById(bean.getId());
   if (uploadFtpId != null) {
     entity.setUploadFtp(ftpMng.findById(uploadFtpId));
   } else {
     entity.setUploadFtp(null);
   }
   Updater<CmsSite> updater = new Updater<CmsSite>(bean);
   entity = dao.updateByUpdater(updater);
   return entity;
 }
Beispiel #2
0
 public CmsSite save(CmsSite currSite, CmsUser currUser, CmsSite bean, Integer uploadFtpId)
     throws IOException {
   if (uploadFtpId != null) {
     bean.setUploadFtp(ftpMng.findById(uploadFtpId));
   }
   bean.init();
   dao.save(bean);
   // 复制本站模板
   cmsResourceMng.copyTplAndRes(currSite, bean);
   // 处理管理员
   cmsUserMng.addSiteToUser(currUser, bean, bean.getFinalStep());
   return bean;
 }