Authored by cailing

下单log

... ... @@ -852,16 +852,19 @@ class CartModel
do {
if (empty($addressId)) {
UdpLog::info('【结算信息】配送地址参数校验','addressId为空');
$result['code'] = 401;
$result['message'] = '配送地址不能为空';
break;
}
if (empty($deliveryTimeId)) {
UdpLog::info('【结算信息】配送时间参数校验','deliveryTime为空');
$result['code'] = 402;
$result['message'] = '请选择配送时间';
break;
}
if (empty($deliveryWayId)) {
UdpLog::info('【结算信息】配送方式参数校验','deliveryWay为空');
$result['code'] = 403;
$result['message'] = '请选择配送方式';
break;
... ...
... ... @@ -3,6 +3,7 @@
use Action\WebAction;
use WebPlugin\Helpers;
use Shopping\CartModel;
use WebPlugin\UdpLog;
/**
* 购物车相关的控制器
... ... @@ -451,9 +452,9 @@ class IndexController extends WebAction
// 调用下单接口
$result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId,
$paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes);
// 判断是否下单成功
if (empty($result['data']['order_code'])) {
UdpLog::info('【结算信息】判断是否下单成功','order_code'.$result['data']['order_code']);
break;
}
... ... @@ -464,13 +465,13 @@ class IndexController extends WebAction
// $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin);
//
// // 记录下单异常的数据
// if (empty($result)) {
// $message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime
// . ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin
// . ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n";
// error_log($message, 3, '/Data/logs/php/pc_error/order.' . date('Ym') . '.log');
// }
// 记录下单异常的数据
if (empty($result)) {
$message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime
. ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin
. ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n";
UdpLog::info('【下单】下单异常数据','message:'.$message,'返回:'.json_encode($result));
}
// // 返回数据
// else {
// // 提交成功清除Cookie
... ...