private  int   doLogin () throws InterruptedException{
        
		boolean  isLogin = false;
        boolean first = true;
        int count =0;
        
        
        do {
             if (!first){
                 log.error("login error. retry!");
                 ThreadUtil.sleep( RandomUtil.getRandomInt(YueCheHelper.MAX_SLEEP_TIME));
             }else{
                 first = false;
             }
             
             int loginResult = login(yueCheItem.getUserName(), yueCheItem.getPassword());
             
             if(loginResult == YueChe.LONGIN_PROXY_ERROR || loginResult == YueChe.LONGIN_IP_FORBIDDEN ){
            	 log.error("proxy error or ip forbidden !");
            	 return 3;
             } else if( loginResult == YueChe.LONGIN_ACCOUNT_ERROR ){
            	 String info ="accountError:"+ yueCheItem.getUserName()+","+ yueCheItem.getPassword();
            	 log.error(info); 
            	 YueCheHelper.updateYueCheBookInfo(yueCheItem.getId(), YueCheItem.BOOK_CAR_ACCOUNT_ERROR, info);
            	 return 3;
             }else if( loginResult == YueChe.LONGIN_SUCCESS ){
            	 isLogin = true;
             }else{
            	 log.error("login error!"); 
             }
             
             count ++;
             if(count % 10 == 0){
            	int ycResult =  YueCheHelper.getYueCheBookInfo(yueCheItem.getId());
            	if(ycResult == YueCheItem.BOOK_CAR_SUCCESS ||
            			ycResult == YueCheItem.BOOK_CAR_ALREADY_BOOKED_CAR ){
            		log.info(yueCheItem.getUserName()+"已经约车成功.");
            		return 2;
            	}
             }
             
       }while (!isLogin);
        log.info("login success!");
       return 0;
    }