Package org.springframework.web.servlet.view

Examples of org.springframework.web.servlet.view.RedirectView


    Brand brand = new Brand();
    brand.setName(name);
    brand.setDescription(description);
    brand.setUrl(url);
    productDao.createBrand(brand);
    return new ModelAndView(new RedirectView("../page/management/brand/brandlist.jsp"));
  }
View Full Code Here


        for (int i = 0 ; i < delBrandIds.length ; i++) {
          productDao.delBrand(Long.parseLong(delBrandIds[i]));
        }
      }
      this.clearKeyStore(request);
    return new ModelAndView(new RedirectView("../page/management/brand/brandlist.jsp"));
  }
View Full Code Here

      }
      return null;
    }
    if (Constants.getModuleUrls().get(moduleId).getUrl().indexOf("page") > -1) {
      System.out.println(Constants.getModuleUrls().get(moduleId).getUrl());
      return new ModelAndView(new RedirectView(Constants.getModuleUrls().get(moduleId).getUrl()));
    }
    return new ModelAndView(Constants.getModuleUrls().get(moduleId).getUrl());
  }
View Full Code Here

      role.setMids(modules);
      role.setName(roleName);
      role.setUid(user.getId());
      role.setCreateTime(new Date());
      roleDao.updateRole(role);
      return new ModelAndView(new RedirectView("page/management/systemRole/rolelist.jsp"));
    }
View Full Code Here

      role.setMids(modules);
      role.setName(roleName);
      role.setUid(user.getId());
      role.setCreateTime(new Date());
      roleDao.createRole(role);
      return new ModelAndView(new RedirectView("page/management/systemRole/rolelist.jsp"));
    }
View Full Code Here

        for (int i = 0 ; i < delRoleIds.length ; i++) {
          roleService.ForceDelRole(Integer.parseInt(delRoleIds[i]));
        }
      }
      this.clearKeyStore(request);
      return new ModelAndView(new RedirectView("page/management/systemRole/rolelist.jsp"));
    }
View Full Code Here

        for (int i = 0 ; i < delUserIds.length ; i++) {
          userCardService.delUserById(Long.parseLong(delUserIds[i]));
        }
      }
      this.clearKeyStore(request);
    return new ModelAndView(new RedirectView("../page/management/member/list_member.jsp"));
  }
View Full Code Here

         
          userDao.resetUserPassword(Long.parseLong(delUserIds[i]), password);
        }
      }
      this.clearKeyStore(request);
    return new ModelAndView(new RedirectView("../page/management/member/list_member.jsp"));
  }
View Full Code Here

         
          userDao.lockUser(Long.parseLong(delUserIds[i]), flag);
        }
      }
      this.clearKeyStore(request);
    return new ModelAndView(new RedirectView("../page/management/member/list_member.jsp"));
  }
View Full Code Here

      user.setEmail(email);
      user.setSex(Integer.parseInt(sex));
      user.setMobile(mobile);
      user.setTruename(truename);
      userCardService.updateUser(user);
      return new ModelAndView(new RedirectView("../page/management/member/list_member.jsp"));
    }
    long orid = 0;
    long type = 0l;
    if(rtUser!=null){
      type = rtUser.getUsertype();
      if(type==2){
        Merchant or = (Merchant)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(or!=null){
          orid = or.getID();
        }
      }
      if(type==3){
        Organization or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(or!=null){
          orid = or.getID();
        }
      }
    }
    if(orid!=0){
      User user = new User();
      user.setEmail(email);
      user.setOpener(rtUser);
      user.setRegistertime(new Date());
      user.setLastlogin(new Date());
      user.setUsername(mobile);
      user.setPassword(password);
      user.setTruename(truename);
      user.setSex(Integer.parseInt(sex));
      user.setMobile(mobile);
      user.setUsertype(User.USER_TYPE_NORMAL);
      user.setParenttype(type);
      user.setOrganizationid(orid);
      user.setEnabled(true);

      user.setLocked(false);
      user.setCardEnd("0");
      user.setCardStart("0");
      user.setCurMaxCard("0");
//      userCardService.createUser(user);
     
//      User ru = userDao.findUserById(rtUser.getId());
//      String cardStart = ru.getCardStart();
//      String cardCur = ru.getCurMaxCard();
//      if("0".equals(cardCur))
//      {
//        cardCur = cardStart;
//      }else
//      {
//        cardCur = Long.parseLong(cardCur)+1l+"";
//      }
      Card card = cardDao.findCard(cardid);
      if(card == null )card = cardDao.createCard(cardid);
       
      userCardService.createUser(user,card);

//      ru.setCurMaxCard(cardCur);
//      userCardService.updateUser(ru);
     
      //当开卡成功后发短信到手机
      //尊敬的会员您的乐共享登录名13036780222,卡/号818800010022密/码abc123,请登录www.lgx8.com【乐共享】
      String content = "尊敬的会员您的乐共享登录名"+user.getUsername()+",卡/号"+user.getCard().getId()+"密/码"+password+",请登录www.lgx8.com";
      SendSms.sendSms(user.getMobile(), content);
     
    }
   
    return new ModelAndView(new RedirectView("../page/management/member/list_member.jsp"));
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.servlet.view.RedirectView

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.