Package com.jeecms.cms.entity.main

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


   */
  @RequestMapping(value = "/member/index.jspx", method = RequestMethod.GET)
  public String index(HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
View Full Code Here


   */
  @RequestMapping(value = "/member/profile.jspx", method = RequestMethod.GET)
  public String profileInput(HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
View Full Code Here

   */
  @RequestMapping(value = "/member/portrait.jspx", method = RequestMethod.GET)
  public String portrait(HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
View Full Code Here

  @RequestMapping(value = "/member/profile.jspx", method = RequestMethod.POST)
  public String profileSubmit(CmsUserExt ext, String nextUrl,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) throws IOException {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    ext.setId(user.getId());
    cmsUserExtMng.update(ext, user);
    log.info("update CmsUserExt success. id={}", user.getId());
    return FrontUtils.showSuccess(request, model, nextUrl);
  }
View Full Code Here

   */
  @RequestMapping(value = "/member/pwd.jspx", method = RequestMethod.GET)
  public String passwordInput(HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
View Full Code Here

  @RequestMapping(value = "/member/pwd.jspx", method = RequestMethod.POST)
  public String passwordSubmit(String origPwd, String newPwd, String email,
      String nextUrl, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) throws IOException {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    FrontUtils.frontData(request, model, site);
    MemberConfig mcfg = site.getConfig().getMemberConfig();
    // 没有开启会员功能
    if (!mcfg.isMemberOn()) {
      return FrontUtils.showMessage(request, model, "member.memberClose");
    }
    if (user == null) {
      return FrontUtils.showLogin(request, model, site);
    }
    WebErrors errors = validatePasswordSubmit(user.getId(), origPwd,
        newPwd, email, request);
    if (errors.hasErrors()) {
      return FrontUtils.showError(request, response, model, errors);
    }
    cmsUserMng.updatePwdEmail(user.getId(), newPwd, email);
    return FrontUtils.showSuccess(request, model, nextUrl);
  }
View Full Code Here

   * @param response
   */
  @RequestMapping("/member/checkPwd.jspx")
  public void checkPwd(String origPwd, HttpServletRequest request,
      HttpServletResponse response) {
    CmsUser user = CmsUtils.getUser(request);
    boolean pass = cmsUserMng.isPasswordValid(user.getId(), origPwd);
    ResponseUtils.renderJson(response, pass ? "true" : "false");
  }
View Full Code Here

  public String list(Integer pageNo, String title, Date sendBeginTime,
      Date sendEndTime, Boolean status, Integer box,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    Pagination pagination = null;
    String returnPage = "message/inbox";
    if (box == null) {
      box = 0;
    }
    if (box.equals(0)) {
      // 收件箱
      pagination = receiverMessageMng.getPage(site.getId(), null, user
          .getId(), title, sendBeginTime, sendEndTime, status, box,
          false, cpn(pageNo), CookieUtils.getPageSize(request));
      returnPage = "message/inbox";
    } else if (box.equals(1)) {
      // 发件箱
      pagination = messageMng.getPage(site.getId(), user.getId(), null,
          title, sendBeginTime, sendEndTime, status, box, false,
          cpn(pageNo), CookieUtils.getPageSize(request));
      returnPage = "message/sendbox";
    } else if (box.equals(2)) {
      // 草稿箱
      pagination = messageMng.getPage(site.getId(), user.getId(), null,
          title, sendBeginTime, sendEndTime, status, box, false,
          cpn(pageNo), CookieUtils.getPageSize(request));
      returnPage = "message/draftbox";
    } else if (box.equals(3)) {
      // 垃圾箱(可能从收件箱或者从发件箱转过来)
      pagination = receiverMessageMng.getPage(site.getId(), user.getId(),
          user.getId(), title, sendBeginTime, sendEndTime, status,
          box, false, cpn(pageNo), CookieUtils.getPageSize(request));
      returnPage = "message/trashbox";
    }
    model.addAttribute("msg", request.getAttribute("msg"));
    model.addAttribute("pagination", pagination);
View Full Code Here

  public String send(CmsMessage message, String username, Integer groupId,
      Integer pageNo, String title, Date sendBeginTime, Date sendEndTime,
      Boolean status, Integer box, ModelMap model,
      HttpServletRequest request, HttpServletResponse response) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    Date now = new Date();
    CmsReceiverMessage receiverMessage = new CmsReceiverMessage();
    CmsUser msgReceiverUser = userMng.findByUsername(username);
    if (msgReceiverUser != null) {
      messageInfoSet(message, receiverMessage, user, msgReceiverUser,
          now, site, request);
    }
    // 按会员组推送站内信
    if (groupId != null && !groupId.equals(-1)) {
      List<CmsUser> users;
      CmsUser tempUser;
      CmsMessage tempMsg;
      CmsReceiverMessage tempReceiverMsg;
      if (groupId.equals(0)) {
        // 所有未禁用会员
        users = userMng.getList(null, null, null, null, false, false,null);
        if (users != null && users.size() > 0) {
          for (int i = 0; i < users.size(); i++) {
            tempUser = users.get(i);
            tempMsg = new CmsMessage();
            tempMsg.setMsgTitle(message.getMsgTitle());
            tempMsg.setMsgContent(message.getMsgContent());
            tempReceiverMsg = new CmsReceiverMessage();
            if (msgReceiverUser != null) {
              if (!tempUser.equals(msgReceiverUser)) {
                messageInfoSet(tempMsg, tempReceiverMsg, user,
                    tempUser, now, site, request);
              }
            } else {
              messageInfoSet(tempMsg, tempReceiverMsg, user,
                  tempUser, now, site, request);
            }
          }
        }
      } else {
        // 非禁用的会员
        users = userMng.getList(null, null, null, groupId, false,
            false, null);
        if (users != null && users.size() > 0) {
          for (int i = 0; i < users.size(); i++) {
            tempUser = users.get(i);
            tempMsg = new CmsMessage();
            tempMsg.setMsgTitle(message.getMsgTitle());
            tempMsg.setMsgContent(message.getMsgContent());
            tempReceiverMsg = new CmsReceiverMessage();
            if (msgReceiverUser != null) {
              if (!tempUser.equals(msgReceiverUser)) {
                messageInfoSet(tempMsg, tempReceiverMsg, user,
                    tempUser, now, site, request);
              }
            } else {
              messageInfoSet(tempMsg, tempReceiverMsg, user,
View Full Code Here

  public String save(CmsMessage message, String username, Integer pageNo,
      String title, Date sendBeginTime, Date sendEndTime, Boolean status,
      Integer box, ModelMap model, HttpServletRequest request,
      HttpServletResponse response) {
    CmsSite site = CmsUtils.getSite(request);
    CmsUser user = CmsUtils.getUser(request);
    message.setMsgBox(2);
    message.setMsgSendUser(user);
    CmsUser msgReceiverUser = userMng.findByUsername(username);
    message.setMsgReceiverUser(msgReceiverUser);
    message.setMsgStatus(false);
    // 作为草稿和发件箱的区别
    message.setSendTime(null);
    // message.setSendTime(new Date());
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.