|
|
@@ -3608,16 +3608,18 @@ class User extends BaseController
|
|
3608
|
3608
|
$extract_amount = $this->request->param('extract_amount', 0);
|
|
3609
|
3609
|
if ($type == 'brokerage') {
|
|
3610
|
3610
|
$brokerage_price = Db::name('user')->where('uid', $uid)->value('brokerage_price');
|
|
3611
|
|
- $no_clear_amount = Db::name('user_bill')
|
|
3612
|
|
- ->where('uid', $uid)
|
|
3613
|
|
- ->where('commission_type', '<>', 5)
|
|
3614
|
|
- ->where('pm', 1)
|
|
3615
|
|
- ->where('status', 0)
|
|
3616
|
|
- ->sum('number');
|
|
3617
|
|
- $clear_amount = $brokerage_price - $no_clear_amount;
|
|
3618
|
|
- if ($user['brokerage_price'] < (systemConfig('withdrawal_money'))){
|
|
3619
|
|
- return app('json')->fail('未到达提现最低额度');
|
|
3620
|
|
- }
|
|
|
3611
|
+ // 参考结算任务中的代码片段, 余额中 应不包含未结算余额
|
|
|
3612
|
+ // $no_clear_amount = Db::name('user_bill')
|
|
|
3613
|
+ // ->where('uid', $uid)
|
|
|
3614
|
+ // ->where('commission_type', '<>', 5)
|
|
|
3615
|
+ // ->where('pm', 1)
|
|
|
3616
|
+ // ->where('status', 0)
|
|
|
3617
|
+ // ->sum('number');
|
|
|
3618
|
+ // $clear_amount = $brokerage_price - $no_clear_amount;
|
|
|
3619
|
+ $clear_amount = $brokerage_price;
|
|
|
3620
|
+ // if ($user['brokerage_price'] < (systemConfig('withdrawal_money'))){
|
|
|
3621
|
+ // return app('json')->fail('未到达提现最低额度');
|
|
|
3622
|
+ // }
|
|
3621
|
3623
|
if($extract_amount > $clear_amount){
|
|
3622
|
3624
|
return app('json')->fail("可用金额不足提现");
|
|
3623
|
3625
|
}
|