userservicebean.java~22~

来自「一个很不错的电子商务后台管理系统 这是一个电子商务网站的后台管理系统 要」· JAVA~22~ 代码 · 共 78 行

JAVA~22~
78
字号
package xian.bin.serivce;import java.util.*;import xian.bin.user.*;import xian.bin.admin.*;import app.*;public class UserServiceBean implements SerivceUser {  Test test;  public UserServiceBean()throws Exception {    test=new Test();  }  //--------------------后台用户--------------------------------  //添加一个后台用户  public void addAdmin(Object[] obj) throws Exception {    //test.managerHome  }  //删除一个后台用户信息  public void delAdmin(String admin) throws Exception {    test.managerHome.create().delManager(admin);  }  //获得所有后台用户信息  public Collection getAllAdmin() throws Exception {    try{      return test.managerHome.create().getAllManager();    }    catch(Exception e){      e.printStackTrace();    }    return null;  }  //修改后台用户信息  public void updataAdmin(Object[] obj) throws Exception {    /**@todo Implement this xian.bin.serivce.SerivceUser method*/    throw new java.lang.UnsupportedOperationException("Method updataAdmin() not yet implemented.");  }  //---------------------前台用户---------------------------------------  //获得前台所有用户信息  public Collection getAllUser() throws Exception {    System.out.println("在服务接口中查找所有用户信息!!!");    try{      User user=test.userHome.create();      Iterator its=user.getAllUserInfo().iterator();      while(its.hasNext()){        UserDTO dto=(UserDTO)its.next();        System.out.println("name="+dto.getUsername());        System.out.println("pwd="+dto.getPassword());      }      return user.getAllUserInfo();    }    catch(Exception e){      e.printStackTrace();    }    return null;  }  //获得前台普通/会员用户信息----根据用户类型  public Collection getCommonUser(int userType) throws Exception {    /**@todo Implement this xian.bin.serivce.SerivceUser method*/    throw new java.lang.UnsupportedOperationException("Method getCommonUser() not yet implemented.");  }  //删除一个前台用户信息  public void delUser(String userName) throws Exception {    /**@todo Implement this xian.bin.serivce.SerivceUser method*/    throw new java.lang.UnsupportedOperationException("Method delUser() not yet implemented.");  }  //根据用户名进行模糊查找  public Collection getUser(String userName) throws Exception {    /**@todo Implement this xian.bin.serivce.SerivceUser method*/    throw new java.lang.UnsupportedOperationException("Method getUser() not yet implemented.");  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?