...
|
...
|
@@ -39,7 +39,7 @@ class PaymentModel |
|
|
*/
|
|
|
public static function getPayTypeData($uid, $orderCode)
|
|
|
{
|
|
|
$result = array();
|
|
|
$result = array('orderNum' => 0, 'count' => 0, 'pinyouGoods' => '', 'orderNum' => 0, 'orderGoods' => '');
|
|
|
|
|
|
do {
|
|
|
// 订单详情
|
...
|
...
|
@@ -53,6 +53,32 @@ class PaymentModel |
|
|
$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) {
|
...
|
...
|
@@ -76,25 +102,6 @@ class PaymentModel |
|
|
|
|
|
$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;
|
...
|
...
|
@@ -172,8 +179,6 @@ class PaymentModel |
|
|
// 订单数(用于订单统计)
|
|
|
$result['orderCount'] = $orderCount;
|
|
|
$result['is_advance'] = $order['attribute'] == 5 ? 'Y' : 'N';
|
|
|
// 订单商品(用于订单统计)
|
|
|
$result['orderGoods'] = $order['order_goods'];
|
|
|
// 订单商品数(用于订单统计)
|
|
|
$result['ordersGoodsNums'] = count($order['order_goods']);
|
|
|
|
...
|
...
|
|