|  | @@ -75,7 +75,7 @@ class BookTest extends Command
 | 
	
		
			
				|  |  |          //$this->transfromUserOrder();
 | 
	
		
			
				|  |  |          //$this->clearUserReadRecord();
 | 
	
		
			
				|  |  |          //$this->deleteToLongReadRecord();
 | 
	
		
			
				|  |  | -        $this->testBookChapterStats();
 | 
	
		
			
				|  |  | +        $this->clearUserReadRecord();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -619,15 +619,15 @@ class BookTest extends Command
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private function clearUserReadRecord(){
 | 
	
		
			
				|  |  | -        $i = 10000;
 | 
	
		
			
				|  |  | +        $i = 137406313;
 | 
	
		
			
				|  |  |          //$not_uid_key = ['last_read','send_order_id','sign_count','sign_counts','sign_info','sign_day','smart_push','inner_send_order_id','gxhp','property','bind_phone_status','ua'];
 | 
	
		
			
				|  |  |          $k = 0;
 | 
	
		
			
				|  |  | -        while ( $i<108655782 ){
 | 
	
		
			
				|  |  | +        while ( $i<108655782){
 | 
	
		
			
				|  |  |              $i++;
 | 
	
		
			
				|  |  |              $last_read = ReadRecordService::getByField($i,'last_read');
 | 
	
		
			
				|  |  |              if(!$last_read){
 | 
	
		
			
				|  |  |                  $k++;
 | 
	
		
			
				|  |  | -                Redis::del('book_read:'.$i);
 | 
	
		
			
				|  |  | +                Redis::del('book_read:'.$i,'userRecommendBids:'.$i);
 | 
	
		
			
				|  |  |                  continue;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              $last_info = explode('_',$last_read);
 | 
	
	
		
			
				|  | @@ -635,16 +635,16 @@ class BookTest extends Command
 | 
	
		
			
				|  |  |                  $k++;
 | 
	
		
			
				|  |  |                  Redis::del('book_read:'.$i);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if(time()-$last_info[2]>=5*30*86400 ){
 | 
	
		
			
				|  |  | +            if( (time()-$last_info[2]) >=2*30*86400 ){
 | 
	
		
			
				|  |  |                  $record = Redis::hgetall('book_read:'.$i);
 | 
	
		
			
				|  |  |                  $data = [];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                foreach ($record as $k=>$item){
 | 
	
		
			
				|  |  | -                    $data[] = ['uid'=>$i,'field'=>$k,'value'=>$item,
 | 
	
		
			
				|  |  | +                foreach ($record as $ks=>$item){
 | 
	
		
			
				|  |  | +                    $data[] = ['uid'=>$i,'field'=>$ks,'value'=>$item,
 | 
	
		
			
				|  |  |                          'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')];
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  $k++;
 | 
	
		
			
				|  |  | -                Redis::del('book_read:'.$i);
 | 
	
		
			
				|  |  | +                Redis::del('book_read:'.$i,'userRecommendBids:'.$i);
 | 
	
		
			
				|  |  |                  DB::table('read_record_from_redis')->insert($data);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 |