| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -2,10 +2,12 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					namespace App\Http\Controllers\Api; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use App\Common\OrderStatus; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use App\Models\Agent; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use App\Models\Order; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use App\Models\OrderProductItem; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use App\Models\Product; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use App\Service\SmsService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Illuminate\Support\Facades\Cache; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Illuminate\Support\Facades\DB; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -18,7 +20,28 @@ class TestController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public function index() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return $this->login(2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							$orders = Order::query() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								->where('status', OrderStatus::PAY_EARNEST) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								->get(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							$sms = new SmsService(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							foreach ($orders as $order) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								if (!empty($order->mobile)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									$sms->send( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										'pay', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										[ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$order->order_no, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											'定金/订金', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$order->timeout, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											'定金/订金', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											'小程序' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										[ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$order->mobile | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return 2; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						/** | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |