Package com.jeecms.cms.entity.main

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


  }

  public CmsUser updateAdmin(CmsUser bean, CmsUserExt ext, String password,
      Integer groupId, Integer[] roleIds, Integer[] channelIds,
      Integer siteId, Byte step, Boolean allChannel) {
    CmsUser user = updateAdmin(bean, ext, password, groupId, roleIds,
        channelIds);
    // 更新所属站点
    cmsUserSiteMng.updateByUser(user, siteId, step, allChannel);
    return user;
  }
View Full Code Here


  }

  public CmsUser updateAdmin(CmsUser bean, CmsUserExt ext, String password,
      Integer groupId, Integer[] roleIds, Integer[] channelIds,
      Integer[] siteIds, Byte[] steps, Boolean[] allChannels) {
    CmsUser user = updateAdmin(bean, ext, password, groupId, roleIds,
        channelIds);
    // 更新所属站点
    cmsUserSiteMng.updateByUser(user, siteIds, steps, allChannels);
    return user;
  }
View Full Code Here

  private CmsUser updateAdmin(CmsUser bean, CmsUserExt ext, String password,
      Integer groupId, Integer[] roleIds, Integer[] channelIds) {
    Updater<CmsUser> updater = new Updater<CmsUser>(bean);
    updater.include("email");
    CmsUser user = dao.updateByUpdater(updater);
    user.setGroup(cmsGroupMng.findById(groupId));
    cmsUserExtMng.update(ext, user);
    // 更新角色
    user.getRoles().clear();
    if (roleIds != null) {
      for (Integer rid : roleIds) {
        user.addToRoles(cmsRoleMng.findById(rid));
      }
    }
    // 更新栏目权限
    Set<Channel> channels = user.getChannels();
    // 清除
    for (Channel channel : channels) {
      channel.getUsers().remove(user);
    }
    user.getChannels().clear();
    // 添加
    if (channelIds != null) {
      Channel channel;
      for (Integer cid : channelIds) {
        channel = channelMng.findById(cid);
View Full Code Here

    return user;
  }

  public CmsUser updateMember(Integer id, String email, String password,
      Boolean isDisabled, CmsUserExt ext, Integer groupId) {
    CmsUser entity = findById(id);
    if (!StringUtils.isBlank(email)) {
      entity.setEmail(email);
    }
    if (isDisabled != null) {
      entity.setDisabled(isDisabled);
    }
    if (groupId != null) {
      entity.setGroup(cmsGroupMng.findById(groupId));
    }
    cmsUserExtMng.update(ext, entity);
    unifiedUserMng.update(id, password, email);
    return entity;
  }
View Full Code Here

    return user;
  }

  public CmsUser deleteById(Integer id) {
    unifiedUserMng.deleteById(id);
    CmsUser bean = dao.deleteById(id);
    //删除收藏信息
    bean.clearCollection();
    return bean;
  }
View Full Code Here

  @RequestMapping("/admin_local/v_list.do")
  public String list(String queryUsername, String queryEmail,
      Integer queryGroupId, Boolean queryDisabled, Integer pageNo,
      HttpServletRequest request, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser currUser = CmsUtils.getUser(request);
    Pagination pagination = manager.getPage(queryUsername, queryEmail, site
        .getId(), queryGroupId, queryDisabled, true,
        currUser.getRank(), cpn(pageNo), CookieUtils
            .getPageSize(request));
    model.addAttribute("pagination", pagination);

    model.addAttribute("queryUsername", queryUsername);
    model.addAttribute("queryEmail", queryEmail);
View Full Code Here

  }

  @RequestMapping("/admin_local/v_add.do")
  public String add(HttpServletRequest request, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser currUser = CmsUtils.getUser(request);
    List<CmsGroup> groupList = cmsGroupMng.getList();
    List<CmsRole> roleList = cmsRoleMng.getList();
    model.addAttribute("site", site);
    model.addAttribute("groupList", groupList);
    model.addAttribute("roleList", roleList);
    model.addAttribute("currRank", currUser.getRank());
    return "admin/local/add";
  }
View Full Code Here

      HttpServletRequest request, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    String queryUsername = RequestUtils.getQueryParam(request,
        "queryUsername");
    String queryEmail = RequestUtils.getQueryParam(request, "queryEmail");
    CmsUser currUser = CmsUtils.getUser(request);
    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);
    model.addAttribute("site", site);
    model.addAttribute("userSite", userSite);
    model.addAttribute("roleIds", admin.getRoleIds());
    model.addAttribute("groupList", groupList);
    model.addAttribute("roleList", roleList);
    model.addAttribute("currRank", currUser.getRank());

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

  @RequestMapping("/admin_global/v_list.do")
  public String list(String queryUsername, String queryEmail,
      Integer queryGroupId, Boolean queryDisabled, Integer pageNo,
      HttpServletRequest request, ModelMap model) {
    CmsUser currUser = CmsUtils.getUser(request);
    Pagination pagination = manager.getPage(queryUsername, queryEmail,
        null, queryGroupId, queryDisabled, true, currUser.getRank(),
        cpn(pageNo), CookieUtils.getPageSize(request));
    model.addAttribute("pagination", pagination);

    model.addAttribute("queryUsername", queryUsername);
    model.addAttribute("queryEmail", queryEmail);
View Full Code Here

    return "admin/global/list";
  }

  @RequestMapping("/admin_global/v_add.do")
  public String add(HttpServletRequest request, ModelMap model) {
    CmsUser currUser = CmsUtils.getUser(request);
    List<CmsGroup> groupList = cmsGroupMng.getList();
    List<CmsSite> siteList = cmsSiteMng.getList();
    List<CmsRole> roleList = cmsRoleMng.getList();
    model.addAttribute("groupList", groupList);
    model.addAttribute("siteList", siteList);
    model.addAttribute("roleList", roleList);
    model.addAttribute("currRank", currUser.getRank());
    return "admin/global/add";
  }
View Full Code Here

TOP

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

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.