| | |
| | | use app\common\service\order\OrderRefundService; |
| | | use app\common\model\supplier\Balance as supplierBalanceModel; |
| | | use app\common\model\supplier\Supplier as SupplierModel; |
| | | |
| | | use app\common\model\payment\PaymentLog as PaymentLogModel; |
| | | /** |
| | | * 普通订单模型 |
| | | */ |
| | |
| | | foreach ($productList as &$item) { |
| | | // 商品单价 |
| | | $item['product_price'] = $item['product_sku']['product_price']; |
| | | $item['settlement_price'] = $item['product_sku']['settlement_price']; |
| | | // 商品购买数量 |
| | | $item['total_num'] = $params['product_num']; |
| | | $item['spec_sku_id'] = $item['product_sku']['spec_sku_id']; |
| | | // 商品购买总金额 |
| | | $item['total_price'] = helper::bcmul($item['product_price'], $params['product_num']); |
| | | // 商品总结算价 |
| | | $item['total_settlement_price'] = helper::bcmul($item['settlement_price'], $params['product_num']); |
| | | } |
| | | $supplierData[] = [ |
| | | 'shop_supplier_id' => $product['shop_supplier_id'], |
| | |
| | | } else { |
| | | $orderInfo->save(['online_money' => $online_money]); |
| | | } |
| | | } |
| | | }$payment = new PaymentLogModel(); |
| | | $paylog_data = [ |
| | | 'app_id' => $orderInfo['app_id'], |
| | | 'order_no' => $order_no, |
| | | 'order_id' => $orderInfo['order_id'], |
| | | 'online_money' => $online_money, |
| | | 'order_source' => $orderInfo['order_source'] |
| | | ]; |
| | | $payment->savePaymentLog($paylog_data); |
| | | $online_money > 0 && $payment = self::onOrderPayment($user, $order_no, $payType, $params['pay_source'], $online_money, $multiple, $shop_supplier_id); |
| | | |
| | | $result['order_id'] = $params['order_id']; |