| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -58,14 +58,21 @@ class StoreService implements StoreServiceInterface | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ->first(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public function getList($marketId, $page=1, $pagesize=10) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public function getList($marketId,$ids, $page=1, $pagesize=10) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $market = Market::query()->withoutGlobalScope('normal')->find($marketId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $builder = Store::query(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $paginate = $builder->where('market_id',$marketId)->orderBy('is_rest', 'asc')->paginate($pagesize); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $builder = Store::query()->where('market_id',$marketId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(!is_null($ids)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            $ids = explode(',',$ids); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            $builder->whereNotIn('id',$ids); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $paginate = $builder->orderBy('is_rest', 'asc')->paginate($pagesize); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $stores = $paginate->toArray(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $market->stores = $stores['data']; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ['has_more_pages' => $paginate->hasMorePages(), 'market' => $market]; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $newIds = array_values(array_column($stores['data'], 'id')); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $ids = array_merge($ids,$newIds); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        $ids = implode(',',$ids); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ['has_more_pages' => $paginate->hasMorePages(), 'market' => $market,'ids' => $ids]; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public function getListByMarketId($marketId, $page=1, $pagesize=10) | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |