diff --git a/app/Controller/Payment/AccountController.php b/app/Controller/Payment/AccountController.php index a260cc2..cdd7dc4 100644 --- a/app/Controller/Payment/AccountController.php +++ b/app/Controller/Payment/AccountController.php @@ -188,7 +188,11 @@ class AccountController extends AbstractController $userInfo = $this->checkUser($request); $account = Account::where('id', $userInfo['userId'])->first(); $userId = $this->resetUserId($userInfo['userId']); - $user = User::where('user_id', $userId)->first(['realname_flag', 'bind_card_flag', 'set_pwd_flag', 'mobile', 'real_name', 'certificate_no', 'user_type', 'apply_no', 'is_platform_account']); + + $user = User::where('user_id', $userId)->first(['member_id', 'realname_flag', 'bind_card_flag', 'set_pwd_flag', 'mobile', 'real_name', 'certificate_no', 'user_type', 'apply_no', 'is_platform_account']); + + $this->userService->rsyncBankCards($user->member_id); + $bankCard = BankCard::where('user_id', $userId)->first(['id', 'bank_name', 'card_user_name']); return $this->success(['username' => $account->username, 'userInfo' => $user, 'bankCard' => $bankCard]); } @@ -208,4 +212,13 @@ class AccountController extends AbstractController $url = $this->userService->companyRegister($requestLog->getData(), $requestLog->app, $requestLog->request_token); return $this->success(['url' => $url]); } + + public function signWithdrawEntrust(RequestInterface $request) + { + $userInfo = $this->checkUser($request); + $userId = $this->resetUserId($userInfo['userId']); + $requestLog = $this->createRequestLog(['userId' => $userId, 'returnUrl' => 'http://124.223.222.61:9701/account.html']); + $url = $this->userService->signWithdrawEntrust($requestLog->getData(), $requestLog->app, $requestLog->request_token); + return $this->success(['url' => $url]); + } } diff --git a/config/routes.php b/config/routes.php index 98b530d..084f0e9 100644 --- a/config/routes.php +++ b/config/routes.php @@ -49,6 +49,7 @@ Router::addGroup('/account',function () { Router::post('/user-info', [AccountController::class, 'getUserInfo']); Router::get('/company-register', [AccountController::class, 'companyRegister']); Router::post('/update-password', [AccountController::class, 'updatePassword']); + Router::get('/sign-withdraw-entrust', [AccountController::class, 'signWithdrawEntrust']); }, []); Router::addGroup('/notify',function () {