|
|
@@ -49,7 +49,7 @@ class Order extends Api
|
|
|
try {
|
|
|
|
|
|
$amount = $ledgerWalletModel::getWalletChaBao($this->auth->id);
|
|
|
- if(bccomp($order_info['price'], $amount, 2) > 0) throw new Exception(__("余额不足请前往充值"), 300);
|
|
|
+ if(bccomp($order_info['price'], $amount, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
|
|
|
if($order_info->stock == 0 || time() >= $order_info->end_time) throw new Exception(__("抢购已结束"));
|
|
|
|
|
|
// 生成订单
|
|
|
@@ -166,7 +166,7 @@ class Order extends Api
|
|
|
$order_info = $productTransfer->where('id', $params['order_id'])->where('status', $productTransfer::NORMAL)->find();
|
|
|
if(empty($order_info)) throw new Exception(__("订单不存在"));
|
|
|
$chabao = $ledgerWalletModel::getWalletChaBao($this->auth->id);
|
|
|
- if(bccomp($order_info['price'], $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 300);
|
|
|
+ if(bccomp($order_info['price'], $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
|
|
|
|
|
|
$order_data['order_id'] = $params['order_id'];
|
|
|
$order_data['product_id']= $order_info['product_id'];
|
|
|
@@ -222,7 +222,7 @@ class Order extends Api
|
|
|
|
|
|
$chabao = $ledgerWalletModel::getWalletChaBao($this->auth->id);
|
|
|
$fees = bcmul($order_info['price'], getConfig('giveaway'), 2);
|
|
|
- if(bccomp($fees, $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 300);
|
|
|
+ if(bccomp($fees, $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
|
|
|
|
|
|
//添加记录
|
|
|
$order_data['order_id'] = $params['order_id'];
|