Package com.jeecms.cms.entity.main

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


@Repository
public class CmsUserSiteDaoImpl extends HibernateBaseDao<CmsUserSite, Integer>
    implements CmsUserSiteDao {
  public CmsUserSite findById(Integer id) {
    CmsUserSite entity = get(id);
    return entity;
  }
View Full Code Here


    return getSession().createQuery(hql).setParameter("siteId", siteId)
        .executeUpdate();
  }

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

  @Transactional(readOnly = true)
  public List<Channel> getTopListByRigth(Integer userId, Integer siteId,
      boolean hasContentOnly) {
    CmsUser user = cmsUserMng.findById(userId);
    CmsUserSite us = user.getUserSite(siteId);
    if (us.getAllChannel()) {
      return getTopList(siteId, hasContentOnly);
    } else {
      return dao.getTopListByRigth(userId, siteId, hasContentOnly);
    }
  }
View Full Code Here

  @Transactional(readOnly = true)
  public List<Channel> getChildListByRight(Integer userId, Integer siteId,
      Integer parentId, boolean hasContentOnly) {
    CmsUser user = cmsUserMng.findById(userId);
    CmsUserSite us = user.getUserSite(siteId);
    if (us.getAllChannel()) {
      return getChildList(parentId, hasContentOnly);
    } else {
      return dao.getChildListByRight(userId, parentId, hasContentOnly);
    }
  }
View Full Code Here

@Service
@Transactional
public class CmsUserSiteMngImpl implements CmsUserSiteMng {
  @Transactional(readOnly = true)
  public CmsUserSite findById(Integer id) {
    CmsUserSite entity = dao.findById(id);
    return entity;
  }
View Full Code Here

    return entity;
  }

  public CmsUserSite save(CmsSite site, CmsUser user, Byte step,
      Boolean allChannel) {
    CmsUserSite bean = new CmsUserSite();
    bean.setSite(site);
    bean.setUser(user);
    bean.setCheckStep(step);
    bean.setAllChannel(allChannel);
    dao.save(bean);
    return bean;
  }
View Full Code Here

      set.remove(us);
    }
  }

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

    WebErrors errors = validateEdit(id, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsUser admin = manager.findById(id);
    CmsUserSite userSite = admin.getUserSite(site.getId());

    List<CmsGroup> groupList = cmsGroupMng.getList();
    List<CmsRole> roleList = cmsRoleMng.getList();

    model.addAttribute("cmsAdmin", admin);
View Full Code Here

      Integer inputUserId, boolean topLevel, boolean recommend,
      ContentStatus status, Byte checkStep, Integer siteId,
      Integer channelId, Integer userId, int orderBy, int pageNo,
      int pageSize) {
    CmsUser user = cmsUserMng.findById(userId);
    CmsUserSite us = user.getUserSite(siteId);
    Pagination p;
    boolean allChannel = us.getAllChannel();
    boolean selfData = user.getSelfAdmin();
    if (allChannel && selfData) {
      // 拥有所有栏目权限,只能管理自己的数据
      p = dao.getPageBySelf(title, typeId, inputUserId, topLevel,
          recommend, status, checkStep, siteId, channelId, userId,
View Full Code Here

TOP

Related Classes of com.jeecms.cms.entity.main.CmsUserSite

Copyright © 2018 www.massapicom. 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.