|
|
@@ -11,6 +11,7 @@ namespace app\controller\api\user;
|
|
11
|
11
|
|
|
12
|
12
|
use alipay\aop\AopCertClient;
|
|
13
|
13
|
use alipay\aop\AopClient;
|
|
|
14
|
+use app\common\repositories\user\UserRepository;
|
|
14
|
15
|
use app\controller\api\Auth;
|
|
15
|
16
|
use crmeb\basic\BaseController;
|
|
16
|
17
|
use app\common\repositories\system\groupData\GroupDataRepository;
|
|
|
@@ -90,6 +91,13 @@ class UserExtract extends BaseController
|
|
90
|
91
|
|
|
91
|
92
|
if (!$data['extract_price']) return app('json')->fail('请输入提现金额');
|
|
92
|
93
|
|
|
|
94
|
+ /** @var UserRepository $userRepository */
|
|
|
95
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
96
|
+ $userEntity = $userRepository->getUserEntityByUid($uid);
|
|
|
97
|
+ if (empty($userEntity->getWithdrawalLimit()) || $userEntity->getWithdrawalLimit() < $data['extract_price']) {
|
|
|
98
|
+ return app('json')->fail('可提现额度不足');
|
|
|
99
|
+ }
|
|
|
100
|
+
|
|
93
|
101
|
if ($type == 1) {
|
|
94
|
102
|
if ($data['extract_price'] < (systemConfig('withdrawal_money')))
|
|
95
|
103
|
return app('json')->fail('未到达提现最低额度');
|