Prechádzať zdrojové kódy

购买套餐余额支付

zhangxiaobin 1 rok pred
rodič
commit
622a802584

+ 5 - 0
application/common/service/OrderService.php

@@ -143,6 +143,11 @@ class OrderService
                 if (!$orderRes['status']) {
                     throw new Exception($orderRes['msg']);
                 }
+                $orderId = isset($orderRes['data']['order_id']) ? $orderRes['data']['order_id'] : 0;
+                $wallet_rs = model('walletcompany')->lockChangeAccountRemain($companyId,'money',$package['price'],207,'购买套餐订单','order',$orderId);
+                if($wallet_rs['status'] === false){
+                    throw new Exception($wallet_rs['msg']);
+                }
                 //更新支付状态
                 $payOrderData['order_status'] = 1;
                 $payOrderWhere['id'] = $payOrderId;

+ 1 - 0
application/extra/wallet.php

@@ -16,6 +16,7 @@ return [
         204 => '用户充值', //增加,跟着104一起加
         205 => '提现', //减少
         206 => '提现拒绝退回', //增加
+        207 => '售出套餐', //增加,仅限余额支付的套餐订单
     ],
     'moneyname' => [
         'money'    => '储值卡',