|
|
@@ -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();
|