|  | @@ -15,6 +15,8 @@ use app\common\Service\OrderService;
 | 
	
		
			
				|  |  |  use app\common\Service\ParentOrderService;
 | 
	
		
			
				|  |  |  use app\common\Enum\OrderEnum;
 | 
	
		
			
				|  |  |  use app\common\Service\CartService;
 | 
	
		
			
				|  |  | +use app\common\Service\Pay\PayOperService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 订单接口
 | 
	
		
			
				|  |  |   */
 | 
	
	
		
			
				|  | @@ -292,6 +294,9 @@ class Order extends Base
 | 
	
		
			
				|  |  |          foreach ($order->order_goods as $item) {
 | 
	
		
			
				|  |  |              $item->express_image = json_decode($item->express_image, true);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        //  查询支付信息
 | 
	
		
			
				|  |  | +        $payInfo = PayOperService::getPayInfoByOrderId($orderId, 1);
 | 
	
		
			
				|  |  | +        $order->pay_info = $payInfo;
 | 
	
		
			
				|  |  |          $this->success('', $order);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -314,12 +319,19 @@ class Order extends Base
 | 
	
		
			
				|  |  |          $param['keywords'] = $this->request->param('keywords', '', 'trim');
 | 
	
		
			
				|  |  |          $status   = OrderEnum::SHOW_TYPE_STATUS_MAP[$status];
 | 
	
		
			
				|  |  |          $list = OrderService::getOrderList($userId ,$param, $status);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //  查询支付信息
 | 
	
		
			
				|  |  | +        $orderIds = array_column(collection($list)->toArray(), 'id');
 | 
	
		
			
				|  |  | +        $payInfo = PayOperService::getPayInfoByOrderIds($orderIds, 1);
 | 
	
		
			
				|  |  | +           
 | 
	
		
			
				|  |  |          foreach ($list as $item) {
 | 
	
		
			
				|  |  |             // $item->append(['order_status_text']);
 | 
	
		
			
				|  |  |              $field = 'id,order_sn,amount,goods_price,order_amount,express_name,express_no,order_goods,order_status_text,order_status';
 | 
	
		
			
				|  |  |              $item->visible(explode(',', $field));
 | 
	
		
			
				|  |  |              $item->order_status_text = OrderEnum::STATUS_TEXT_MAP[$item->order_status];
 | 
	
		
			
				|  |  | +            $item->pay_info = $payInfo->where('order_id', $item->id)->find();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  |          $this->success('获取成功', $list);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |