|  | @@ -8,6 +8,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  namespace App\Http\Controllers\Wap\Pay;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +use App\Modules\SendOrder\Services\SendOrderService;
 | 
	
		
			
				|  |  |  use App\Modules\Subscribe\Models\Order;
 | 
	
		
			
				|  |  |  use App\Modules\Subscribe\Services\OrderService;
 | 
	
		
			
				|  |  |  use App\Modules\Subscribe\Services\YearOrderService;
 | 
	
	
		
			
				|  | @@ -17,6 +18,7 @@ use GuzzleHttp\Client;
 | 
	
		
			
				|  |  |  use Illuminate\Routing\Controller;
 | 
	
		
			
				|  |  |  use Illuminate\Http\Request;
 | 
	
		
			
				|  |  |  use Log;
 | 
	
		
			
				|  |  | +use Redis;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  class MonthOrderController extends Controller
 | 
	
		
			
				|  |  |  {
 | 
	
	
		
			
				|  | @@ -128,6 +130,18 @@ class MonthOrderController extends Controller
 | 
	
		
			
				|  |  |      private function createOrder($uid,$distribution_channel_id,$product_id,$price,$trade_no,$transaction_id){
 | 
	
		
			
				|  |  |          $count = OrderService::getUserChargeTimes($uid);
 | 
	
		
			
				|  |  |          $count = $count + 1;
 | 
	
		
			
				|  |  | +        $send_order_id = 0;
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +            $send_order_id = (int)Redis::hget('book_read:' . $uid, 'send_order_id');
 | 
	
		
			
				|  |  | +        } catch (\Exception $e) {
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $send_order_name = '';
 | 
	
		
			
				|  |  | +        if ($send_order_id) {
 | 
	
		
			
				|  |  | +            $send_order_info = SendOrderService::getById($send_order_id);
 | 
	
		
			
				|  |  | +            if ($send_order_info && isset($send_order_info->name) && !empty($send_order_info->name)) {
 | 
	
		
			
				|  |  | +                $send_order_name = $send_order_info->name;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          $init_order = [
 | 
	
		
			
				|  |  |              'distribution_channel_id' => $distribution_channel_id,
 | 
	
		
			
				|  |  |              'uid' => $uid,
 | 
	
	
		
			
				|  | @@ -138,8 +152,8 @@ class MonthOrderController extends Controller
 | 
	
		
			
				|  |  |              'pay_merchant_source' => 'MONTH',
 | 
	
		
			
				|  |  |              'pay_merchant_id' => 99,
 | 
	
		
			
				|  |  |              'create_ip' => '',
 | 
	
		
			
				|  |  | -            'send_order_id' => '',
 | 
	
		
			
				|  |  | -            'send_order_name' => '',
 | 
	
		
			
				|  |  | +            'send_order_id' => $send_order_id,
 | 
	
		
			
				|  |  | +            'send_order_name' => $send_order_name,
 | 
	
		
			
				|  |  |              'order_type' => 'RECHARGE',
 | 
	
		
			
				|  |  |              'from_bid' => '0',
 | 
	
		
			
				|  |  |              'from_type' => 'auto_month',
 |