소스 검색

提货订单

afa 4 달 전
부모
커밋
2ccfb78c63
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      application/api/controller/Order.php

+ 6 - 3
application/api/controller/Order.php

@@ -101,15 +101,18 @@ class Order extends Api
         Db::startTrans();
         try {
 
-            $amount = $ledgerWalletModel::getWalletTotalChaBao($this->auth->id);
-            if(bccomp($order_info->freight, $amount, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
+            //$amount = $ledgerWalletModel::getWalletTotalChaBao($this->auth->id);
+            //if(bccomp($order_info->freight, $amount, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
 
             // 生成订单
             $userArea->create(['name'=>$params['name'], 'type_id'=>$userArea::TakeAdders, 'phone'=>$params['phone'],'address'=>$params['address'],'order_id'=>$params['order_id']]);
 
             //扣除Rwa数量
             if(!empty($order_info->is_show) && $order_info->popular_price > config('min_rwa_price')) $userModel::updateForRwaNum($order_info->user_id, $userModel::getByParentId($order_info->user_id), 1, '-');
-
+            
+            //扣除运费
+            //if($order_info->freight > 0) $ledgerWalletModel->setChangeFrozen($this->auth->id, $order_info->freight, LedgerFrozenChangeModel::Freight, '-');
+  
             $order_info->type_id = $productOrder::Popular;
             $order_info->status  = $productOrder::Shipped; 
             $order_info->save();