zhangxiaobin 1 год назад
Родитель
Сommit
622a802584
2 измененных файлов с 6 добавлено и 0 удалено
  1. 5 0
      application/common/service/OrderService.php
  2. 1 0
      application/extra/wallet.php

+ 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'    => '储值卡',