Package com.boco.bomc.vpn.domain

Examples of com.boco.bomc.vpn.domain.MainUser


  public UserDaoImpl() {
    super();
  }

  public MainUser findByLoginName(String loginName) throws SQLException {
    String sql = "SELECT * FROM "+new MainUser().getTableName()+" WHERE loginname = ?";
    MainUser mainUser = null;
    List<MainUser> users = super.query(MainUser.class, sql,loginName);
    if(users.size()>0){
      return users.get(0);
    }else{
      return mainUser;
View Full Code Here


  public int updateMainUserApprove(boolean approve,String... loginName) throws SQLException {
    StringBuffer sql = new StringBuffer("");
   
    if(approve){
      sql.append("UPDATE "+new MainUser().getTableName()+" SET approve =1 ");
    }else{
      sql.append("UPDATE "+new MainUser().getTableName()+" SET approve =0 ");
    }
   
    if(loginName!=null&&loginName.length>1){
      sql.append(" WHERE loginname in (");
      for(int i=0;i<loginName.length;i++){
View Full Code Here

    }
    return super.update(sql.toString());
  }

  public List<MainUser> getMainUsers(int offset,int pageSize,QueryCondition condition,Object...params) throws SQLException {
    String sql = "SELECT * FROM "+new MainUser().getTableName();
    if(condition!=null){
      sql = sql+condition.toSQLString();
    }
    List<MainUser> users = this.query(MainUser.class, sql, offset, pageSize, params);
    return users;
View Full Code Here

    List<MainUser> users = this.query(MainUser.class, sql, offset, pageSize, params);
    return users;
  }
 
  public int getMainUsersCount(QueryCondition condition,Object...params) throws SQLException {
    String sql = "SELECT count(*) FROM "+new MainUser().getTableName();
    if(condition!=null){
      sql = sql+condition.toSQLString();
    }
    return super.queryCount(sql, params);
  }
View Full Code Here

   
    //������У��
    if(!StringUtils.isEmpty(username)&&VPNConfig.getVpnApprove()){
      MainUserService service = new MainUserServiceImpl();
      try {
        MainUser mainUser = service.findByLoginName(username);
        if(mainUser==null||mainUser.getApprove()!=1){
          String json ="{\"status\":\"0\",\"message\":\"���ʺŲ��ڰ������У��������¼!\",\"result\":\"{}\"}";
          return new TextRenderer(json);       
        }
      } catch (ServiceException e) {
        logger.error("��ȡ��������Ա��Ϣʧ��", e);
View Full Code Here

TOP

Related Classes of com.boco.bomc.vpn.domain.MainUser

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.