Examples of CmsTopic


Examples of com.jeecms.cms.entity.main.CmsTopic

        + " order by bean.priority asc,bean.id desc";
    return find(hql);
  }

  public CmsTopic findById(Integer id) {
    CmsTopic entity = get(id);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

    getSession().save(bean);
    return bean;
  }

  public CmsTopic deleteById(Integer id) {
    CmsTopic entity = super.get(id);
    if (entity != null) {
      getSession().delete(entity);
    }
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

    // 全部?按站点?按栏目?要不同模板?
    CmsSite site = CmsUtils.getSite(request);
    FrontUtils.frontData(request, model, site);
    FrontUtils.frontPageData(request, model);
    if (topicId != null) {
      CmsTopic topic = cmsTopicMng.findById(topicId);
      if (topic == null) {
        return FrontUtils.pageNotFound(request, response, model);
      }
      model.addAttribute("topic", topic);
      String tpl = topic.getTplContent();
      if (StringUtils.isBlank(tpl)) {
        tpl = FrontUtils.getTplPath(request, site.getSolutionPath(),
            TPLDIR_TOPIC, TOPIC_DEFAULT);
      }
      return tpl;
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    if (id == null) {
      return FrontUtils.pageNotFound(request, response, model);
    }
    CmsTopic topic = cmsTopicMng.findById(id);
    if (topic == null) {
      return FrontUtils.pageNotFound(request, response, model);
    }
    model.addAttribute("topic", topic);
    String tpl = topic.getTplContent();
    if (StringUtils.isBlank(tpl)) {
      tpl = FrontUtils.getTplPath(request, site.getSolutionPath(),
          TPLDIR_TOPIC, TOPIC_DEFAULT);
    }
    FrontUtils.frontData(request, model, site);
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

    return list;
  }

  @Transactional(readOnly = true)
  public CmsTopic findById(Integer id) {
    CmsTopic entity = dao.findById(id);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

    return bean;
  }

  public CmsTopic update(CmsTopic bean, Integer channelId) {
    Updater<CmsTopic> updater = new Updater<CmsTopic>(bean);
    CmsTopic entity = dao.updateByUpdater(updater);
    if (channelId != null) {
      entity.setChannel(channelMng.findById(channelId));
    } else {
      entity.setChannel(null);
    }
    entity.blankToNull();
    return entity;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

    return entity;
  }

  public CmsTopic deleteById(Integer id) {
    dao.deleteContentRef(id);
    CmsTopic bean = dao.deleteById(id);
    return bean;
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

    WebErrors errors = validateEdit(id, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsSite site = CmsUtils.getSite(request);
    CmsTopic topic = manager.findById(id);
    // 模板
    List<String> tplList = getTplList(request, site, topic.getTplContent());
    // 栏目
    Integer siteId;
    Channel channel = topic.getChannel();
    if (channel != null) {
      siteId = channel.getSite().getId();
    } else {
      siteId = site.getId();
    }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsTopic

  private boolean vldExist(Integer id, WebErrors errors) {
    if (errors.ifNull(id, "id")) {
      return true;
    }
    CmsTopic entity = manager.findById(id);
    if (errors.ifNotExist(entity, CmsTopic.class, id)) {
      return true;
    }
    return false;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.