...
|
...
|
@@ -65,6 +65,32 @@ class PayModel |
|
|
$result['orderNum'] = $orderCode;
|
|
|
$result['count'] = $order['payment_amount'];
|
|
|
$result['paymentType'] = ($order['payment_type'] == 1 ? '在线支付' : '货到付款');
|
|
|
// 订单商品(用于订单统计)
|
|
|
$result['orderGoods'] = $order['order_goods'];
|
|
|
|
|
|
//统计成交的skn
|
|
|
$sknList = array();
|
|
|
$skuList = array();
|
|
|
$goodsData = array();
|
|
|
$pinyouGoodsArr = array();
|
|
|
foreach ($order['order_goods'] as $val) {
|
|
|
$sknList[] = $val['product_skn'];
|
|
|
$skuList[] = $val['product_sku'];
|
|
|
$goodsData[] = array(
|
|
|
'goods_name' => $val['product_name'],
|
|
|
'product_sku' => $val['product_sku'],
|
|
|
'price' => $val['goods_price'],
|
|
|
'number' => $val['buy_number']
|
|
|
);
|
|
|
$pinyouGoodsArr[] = $val['product_id'] . ',' . $val['buy_number'];
|
|
|
}
|
|
|
$result['goodsData'] = $goodsData;
|
|
|
// skn列表
|
|
|
$result['sknList'] = implode(',', $sknList);
|
|
|
// sku列表
|
|
|
$result['skuList'] = implode(',', $skuList);
|
|
|
// 品友统计需要的商品数据
|
|
|
$result['pinyouGoods'] = implode(';', $pinyouGoodsArr);
|
|
|
|
|
|
// 货到付款的情况
|
|
|
if ($order['payment_type'] == 2) {
|
...
|
...
|
@@ -87,26 +113,6 @@ class PayModel |
|
|
}
|
|
|
|
|
|
$result['deliveryType'] =isset($order['delivery_time']) ? $order['delivery_time'] : '';
|
|
|
|
|
|
//统计成交的skn
|
|
|
$sknList = array();
|
|
|
$skuList = array();
|
|
|
$goodsData = array();
|
|
|
foreach ($order['order_goods'] as $val) {
|
|
|
$sknList[] = $val['product_skn'];
|
|
|
$skuList[] = $val['product_sku'];
|
|
|
$goodsData[] = array(
|
|
|
'goods_name' => $val['product_name'],
|
|
|
'product_sku' => $val['product_sku'],
|
|
|
'price' => $val['goods_price'],
|
|
|
'number' => $val['buy_number']
|
|
|
);
|
|
|
}
|
|
|
$result['goodsData'] = $goodsData;
|
|
|
// skn列表
|
|
|
$result['sknList'] = implode(',', $sknList);
|
|
|
// sku列表
|
|
|
$result['skuList'] = implode(',', $skuList);
|
|
|
|
|
|
// 用户ID
|
|
|
$result['uid'] = $uid;
|
...
|
...
|
@@ -216,11 +222,8 @@ class PayModel |
|
|
// 订单数(用于订单统计)
|
|
|
$result['orderCount'] = $orderCount;
|
|
|
$result['is_advance'] = $order['attribute'] == 5 ? 'Y' : 'N';
|
|
|
// 订单商品(用于订单统计)
|
|
|
$result['orderGoods'] = $order['order_goods'];
|
|
|
// 订单商品数(用于订单统计)
|
|
|
$result['ordersGoodsNums'] = count($order['order_goods']);
|
|
|
|
|
|
} while (false);
|
|
|
|
|
|
return $result;
|
...
|
...
|
@@ -601,6 +604,7 @@ class PayModel |
|
|
$result['data'] = array(
|
|
|
'pay' => $amount,
|
|
|
'orderNum' => $orderData['order_code'],
|
|
|
'items' => $orderData['order_goods'], // 订单商品
|
|
|
'checkOrderUrl' => Helpers::url('/home/orders/detail', array('orderCode' => $orderData['order_code'])),
|
|
|
'payMode' => ($orderData['payment_type'] == 1 ? '在线支付' : '货到付款'),
|
|
|
'currency' => $orderData['yoho_give_coin'],
|
...
|
...
|
|