酷文首页  
站内搜索:
网站地图 | RSS订阅 | 收藏本站
经济论文
证券金融
工商管理
会计审计
法学论文
医药论文
社会论文
教育论文
计算机论文
艺术论文
哲学论文
财政税收
财务管理
公共管理
理学论文
政治论文
文学论文
工学论文
文化论文
实用文档
应用文
自考成考
演讲稿
法律文书
子栏目导行↓
网站赞助商↓
本类热点↓
本类更新↓
热门标签↓
网摘收藏↓

移动客户管理系统的设计与实现

作者:陈宙富
来源:酷文网
点击:
载入中...
加入时间:2008-07-21
字体大小:[  ]

  String operatorName=loginForm.getOperatorName();
  String operatorPwd=loginForm.getOperatorPwd();
//读取配置文件,初始化上下文
  ApplicationContext context=new FileSystemXmlApplicationContext(
"C:\\ src\\applicationContext.xml");
//获取登录接口
  ILogin login=(ILogin)context.getBean("loginservice");
  //调用业务层的方法判断是否是合法用户
  Toperator operator=login.isOperator(operatorName, operatorPwd);
  request.getSession().setAttribute("operator", operator);
  //获取用户角色
  int role = operator.getRole();
  Tuser user = null;
  //如果用户权限是2的话,就说明是普通用户
  if(role == 2){
   ICustomer cust=(ICustomer)context.getBean("custserver");
   user = cust.queryUser(operator.getToperatorName());
   //把user放入session中
   session.setAttribute("user", user);
  }


  //判断是不是存在该用户,如果存在则放入到session中
  if(operator!=null){
   session.setAttribute("operator", operator);
   //登录成功,跳转到主页面
   return mapping.findForward("success");
  }else{
     //登录失败,回到等录页面
   return mapping.getInputForward();
  }
 }

 

5.3.2  管理员模块
管理员模块实现的是对所有操作员的管理,它通过把操作员相关信息录入,对操作员信息进行管理。本模块还包括配置业务信息模块,开户模块,资源配置模块等几个子模块,其中配置业务费用模块是可方便改变各项业务费用,并提交到数据库。资源配置模块,可以动态生成手机号,开户模块必须根据资源配置模块所产生的手机号新建一个新用户。为了移动客户管理的特殊需求,开户时所填的用户基本信息必须是普通代理商及超级管理员所填的,只允许上述权限的用户才能修改。故在普通用户模块中,对普通用户模块,关闭基本信息的修改功能。
管理员主界面,如图6所示。

 

图6  管理员页面
Fig 6  Manager interface
    管理员能拥有如上图的所有功能,如新增操作员,查看所有操作员,资源管理等。下面将分功能介绍如下。
(1)管理员新增操作员功能,在管理员主页面中选择“新增操作员”链接,就进入了新增操作员的页面。在相关的文本框内按要求填入相关信息后,点击提交,就可以增加一个新的操作员。
新增操作员,如图7所示。

 

图7  新增操作员页面
Fig 7  Add new operator interface
     部分代码如下:
public ActionForward execute(ActionMapping mapping, ActionForm form,
  HttpServletRequest request, HttpServletResponse response) {
 AddOperatorForm addOperatorForm = (AddOperatorForm) form;// TODO Auto-generated method stub
  Toperator operator=new Toperator();
  operator.setRole(addOperatorForm.getRole());
  operator.setToperatorEmail(addOperatorForm.getOperatorEmail());
  operator.setToperatorName(addOperatorForm.getOperatorName());
  operator.setToperatorPwd(addOperatorForm.getOperatorPwd());
  //在AddCustomerAction里有相关注释
//读取配置文件,初始化上下文
 ApplicationContext context=new FileSystemXmlApplicationContext("C:\\Documents and Settings\\Administrator\\workspace\\chinamobile2\\src\\applicationContext.xml");
  IAdminOperator admin=(IAdminOperator)context.getBean("adminservice");


  //调用业务层方法增加操作员
  String message=admin.addOperator(operator);
  System.out.println(message);
  if(!message.equals("")){
   request.setAttribute("message", message);
   return mapping.findForward("success");
  }else{
   return mapping.getInputForward();
  }
(2)管理员查看所有操作员功能,在管理员主页面中选择“查看所有操作员”链接,就进入了查看所有操作员的页面。在页面的表格中将会列出所有本系统的操作员的相关信息,如下图8所示


图8  查看所有操作员页面
 Fig 8  List all operators interface
部分代码如下:
      public ActionForward execute(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response) {
  ApplicationContext ac=new FileSystemXmlApplicationContext(
"C:\\ src\\applicationContext.xml");//读取配置文件,初始化上下文
  IOperator operator=(IOperator)ac.getBean("operatorservice");
  //存放所有操作员的集合
  ArrayList<Toperator> toperator=operator.allOperator();
  request.getSession().setAttribute("allToperators", toperator);
  return mapping.findForward("allToperators");
  }
public ActionForward execute(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response) {
  ApplicationContext ac=new FileSystemXmlApplicationContext(
"C: src\\applicationContext.xml");
  IOperator operator=(IOperator)ac.getBean("operatorservice");转贴于 酷文网-论文下载中心 http://www.coolwen.net


共13页: 上一页 [1] [2] [3] [4] [5] [6] [7] [8] 9 [10] [11] [12] [13] 下一页

网摘收藏:
 -> 在百度中搜索:移动客户管理系统的设计与实现
 -> 在Google中搜索:移动客户管理系统的设计与实现
免责声明 | 关于我们 | 广告联系 | 友情链接 | 网站地图 | 共同合作
免费论文 毕业论文 毕业论文范文 酷文网(www.coolwen.net) 版权所有 coolwen.net 2007,All Rights Reserved
E-mail:hui_love#tom.com(为防止垃圾邮件请把#换成@) 点击这里给我发消息 点击这里给我发消息
湘ICP备07003917号