Authored by cailing

下单log

@@ -852,16 +852,19 @@ class CartModel @@ -852,16 +852,19 @@ class CartModel
852 852
853 do { 853 do {
854 if (empty($addressId)) { 854 if (empty($addressId)) {
  855 + UdpLog::info('【结算信息】配送地址参数校验','addressId为空');
855 $result['code'] = 401; 856 $result['code'] = 401;
856 $result['message'] = '配送地址不能为空'; 857 $result['message'] = '配送地址不能为空';
857 break; 858 break;
858 } 859 }
859 if (empty($deliveryTimeId)) { 860 if (empty($deliveryTimeId)) {
  861 + UdpLog::info('【结算信息】配送时间参数校验','deliveryTime为空');
860 $result['code'] = 402; 862 $result['code'] = 402;
861 $result['message'] = '请选择配送时间'; 863 $result['message'] = '请选择配送时间';
862 break; 864 break;
863 } 865 }
864 if (empty($deliveryWayId)) { 866 if (empty($deliveryWayId)) {
  867 + UdpLog::info('【结算信息】配送方式参数校验','deliveryWay为空');
865 $result['code'] = 403; 868 $result['code'] = 403;
866 $result['message'] = '请选择配送方式'; 869 $result['message'] = '请选择配送方式';
867 break; 870 break;
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 use Action\WebAction; 3 use Action\WebAction;
4 use WebPlugin\Helpers; 4 use WebPlugin\Helpers;
5 use Shopping\CartModel; 5 use Shopping\CartModel;
  6 +use WebPlugin\UdpLog;
6 7
7 /** 8 /**
8 * 购物车相关的控制器 9 * 购物车相关的控制器
@@ -451,9 +452,9 @@ class IndexController extends WebAction @@ -451,9 +452,9 @@ class IndexController extends WebAction
451 // 调用下单接口 452 // 调用下单接口
452 $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, 453 $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId,
453 $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes); 454 $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes);
454 -  
455 // 判断是否下单成功 455 // 判断是否下单成功
456 if (empty($result['data']['order_code'])) { 456 if (empty($result['data']['order_code'])) {
  457 + UdpLog::info('【结算信息】判断是否下单成功','order_code'.$result['data']['order_code']);
457 break; 458 break;
458 } 459 }
459 460
@@ -464,13 +465,13 @@ class IndexController extends WebAction @@ -464,13 +465,13 @@ class IndexController extends WebAction
464 465
465 // $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin); 466 // $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin);
466 // 467 //
467 -// // 记录下单异常的数据  
468 -// if (empty($result)) {  
469 -// $message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime  
470 -// . ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin  
471 -// . ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n";  
472 -// error_log($message, 3, '/Data/logs/php/pc_error/order.' . date('Ym') . '.log');  
473 -// } 468 + // 记录下单异常的数据
  469 + if (empty($result)) {
  470 + $message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime
  471 + . ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin
  472 + . ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n";
  473 + UdpLog::info('【下单】下单异常数据','message:'.$message,'返回:'.json_encode($result));
  474 + }
474 // // 返回数据 475 // // 返回数据
475 // else { 476 // else {
476 // // 提交成功清除Cookie 477 // // 提交成功清除Cookie