|
|
@@ -191,6 +191,29 @@ class UserExtractServices extends BaseServices
|
|
|
} else {
|
|
|
throw new ValidateException('该用户暂不支持企业付款到零钱,请手动转账');
|
|
|
}
|
|
|
+ } else {
|
|
|
+ if ($userExtract['extract_type'] == 'bank') {
|
|
|
+ $userServices = app()->make(UserServices::class);
|
|
|
+ $userInfo = $userServices->get($userExtract['uid']);
|
|
|
+ if (!$userInfo['professional_id']) {
|
|
|
+ throw new ValidateException('用户未认证签约');
|
|
|
+ }
|
|
|
+ $bankInfo = WithdrawService::init()::contractInfo($userInfo['enterprise_professional_facilitator_id']);
|
|
|
+ if (!$bankInfo['sign_img']) throw new ValidateException('用户未签约');
|
|
|
+ $res = WithdrawService::init()::fastIssuing(
|
|
|
+ $userInfo['professional_id'],
|
|
|
+ $userExtract['id'],
|
|
|
+ $bankInfo['name'],
|
|
|
+ $bankInfo['cer_code'],
|
|
|
+ $bankInfo['mobile'],
|
|
|
+ $bankInfo['bank_code'],
|
|
|
+ $extractNumber,
|
|
|
+ '佣金提现'
|
|
|
+ );
|
|
|
+ if ($res) {
|
|
|
+ $this->dao->update($id, ['trade_number' => $res['trade_number']]);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|