Esempio n. 1
0
 /*     */ @Transactional(propagation = Propagation.REQUIRED)
 /*     */ public void deleteDomain(Integer domainid) {
   /* 131 */ EopSiteDomain domain = this.domainManager.get(domainid);
   /* 132 */ UserUtil.validUser(domain.getUserid());
   /* 133 */ int domainCount = this.domainManager.getDomainCount(domain.getSiteid());
   /* 134 */ if (domainCount <= 1) {
     /* 135 */ throw new RuntimeException("此站点只有一个域名不可删除,删除后将不可访问");
     /*     */ }
   /* 137 */ String sql = "delete from eop_sitedomain where id=?";
   /* 138 */ this.daoSupport.execute(sql, new Object[] {domainid});
   /*     */ }
Esempio n. 2
0
 /*     */ public Page list(int pageNo, int pageSize, String order, String search) {
   /* 404 */ Integer userid = EopContext.getContext().getCurrentSite().getUserid();
   /* 405 */ List listdomain = this.domainManager.listUserDomain();
   /* 406 */ if (search == null) /* 407 */ search = "";
   /*     */ else /* 409 */ search = " and sitename like '%" + search + "%'";
   /* 410 */ if (order == null) /* 411 */ order = "";
   /*     */ else {
     /* 413 */ order = " order by " + order.replace(":", " ");
     /*     */ }
   /* 415 */ Page page =
       this.daoSupport.queryForPage(
           "select * from eop_site where deleteflag = 0 and userid = " + userid + search + order,
           pageNo,
           pageSize,
           new Object[0]);
   /*     */
   /* 419 */ List listsite = (List) (List) page.getResult();
   /*     */
   /* 421 */ for (Map site : listsite) {
     /* 422 */ List domainList = new ArrayList();
     /* 423 */ String logofile = site.get("logofile").toString();
     /* 424 */ if (logofile != null) {
       /* 425 */ logofile =
           logofile.replaceAll(
               EopSetting.FILE_STORE_PREFIX,
               EopSetting.IMG_SERVER_DOMAIN
                   + "/user/"
                   + site.get("userid").toString()
                   + "/"
                   + site.get("id").toString());
       /*     */ }
     /*     */
     /* 429 */ site.put("logofile", logofile);
     /* 430 */ for (EopSiteDomain siteDomain : listdomain) {
       /* 431 */ if (site.get("id").toString().equals(siteDomain.getSiteid().toString()))
       /*     */ {
         /* 433 */ domainList.add(siteDomain);
         /*     */ }
       /*     */ }
     /* 436 */ site.put("eopSiteDomainList", domainList);
     /*     */ }
   /*     */
   /* 439 */ return page;
   /*     */ }