|  | @@ -6,6 +6,7 @@ use app\common\model\PreOrder;
 | 
	
		
			
				|  |  |  use GuzzleHttp\Client;
 | 
	
		
			
				|  |  |  use think\Db;
 | 
	
		
			
				|  |  |  use think\Exception;
 | 
	
		
			
				|  |  | +use think\Log;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  class UserService
 | 
	
		
			
				|  |  |  {
 | 
	
	
		
			
				|  | @@ -147,6 +148,12 @@ class UserService
 | 
	
		
			
				|  |  |          } catch (Exception $e) {
 | 
	
		
			
				|  |  |              $result['status'] = 0;
 | 
	
		
			
				|  |  |              $result['msg'] = $e->getMessage();
 | 
	
		
			
				|  |  | +            $errorData = [
 | 
	
		
			
				|  |  | +                'pre_order_id' => $preOrderId,
 | 
	
		
			
				|  |  | +                'params' => isset($paramsData) ? $paramsData : [],
 | 
	
		
			
				|  |  | +                'error' => $result['msg'],
 | 
	
		
			
				|  |  | +            ];
 | 
	
		
			
				|  |  | +            Log::error(json_encode($errorData));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return $result;
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -187,8 +194,9 @@ class UserService
 | 
	
		
			
				|  |  |                  "phrase4" => ["value" => $statusText],
 | 
	
		
			
				|  |  |                  "time2" => ["value" => date('Y年m月d日 H:i:s',$order['createtime'])],
 | 
	
		
			
				|  |  |              ];
 | 
	
		
			
				|  |  | +            $orderMsg['page'] = $orderMsg['page'].'?id='.$order['id'];
 | 
	
		
			
				|  |  |              $paramsData = $orderMsg;
 | 
	
		
			
				|  |  | -            $paramsData['mini_openid'] = $orderMsg['mini_openid'];
 | 
	
		
			
				|  |  | +            $paramsData['mini_openid'] = $order['mini_openid'];
 | 
	
		
			
				|  |  |              $paramsData['data'] = $data;
 | 
	
		
			
				|  |  |              $msgRes = $this->wechatMessageSend($paramsData);
 | 
	
		
			
				|  |  |              if (!$msgRes['status']) {
 | 
	
	
		
			
				|  | @@ -197,6 +205,12 @@ class UserService
 | 
	
		
			
				|  |  |          } catch (Exception $e) {
 | 
	
		
			
				|  |  |              $result['status'] = 0;
 | 
	
		
			
				|  |  |              $result['msg'] = $e->getMessage();
 | 
	
		
			
				|  |  | +            $errorData = [
 | 
	
		
			
				|  |  | +                'order_id' => $orderId,
 | 
	
		
			
				|  |  | +                'params' => isset($paramsData) ? $paramsData : [],
 | 
	
		
			
				|  |  | +                'error' => $result['msg'],
 | 
	
		
			
				|  |  | +            ];
 | 
	
		
			
				|  |  | +            Log::error(json_encode($errorData));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return $result;
 | 
	
		
			
				|  |  |      }
 |