|
|
@ -115,7 +115,11 @@ class AccountController extends AbstractController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$userInfo = $this->checkUser($request);
|
|
|
|
$userInfo = $this->checkUser($request);
|
|
|
|
$userId = $this->resetUserId($userInfo['userId']);
|
|
|
|
$userId = $this->resetUserId($userInfo['userId']);
|
|
|
|
$requestLog = $this->createRequestLog(['userId' => $userId]);
|
|
|
|
$bankCard = BankCard::where('id', $request->input('id', 0))->first();
|
|
|
|
|
|
|
|
if (!$bankCard || $bankCard->user_id != $userId) {
|
|
|
|
|
|
|
|
throw new BusinessException('银行卡不存在');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$requestLog = $this->createRequestLog(['userId' => $userId, 'agreementNo' => $bankCard->agreement_no]);
|
|
|
|
$result = $this->userService->unbindCard($requestLog->getData(), $requestLog->app);
|
|
|
|
$result = $this->userService->unbindCard($requestLog->getData(), $requestLog->app);
|
|
|
|
return $this->success(['result' => $result]);
|
|
|
|
return $this->success(['result' => $result]);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -175,7 +179,7 @@ class AccountController extends AbstractController
|
|
|
|
$account = Account::where('id', $userInfo['userId'])->first();
|
|
|
|
$account = Account::where('id', $userInfo['userId'])->first();
|
|
|
|
$userId = $this->resetUserId($userInfo['userId']);
|
|
|
|
$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(['realname_flag', 'bind_card_flag', 'set_pwd_flag', 'mobile', 'real_name', 'certificate_no', 'user_type', 'apply_no', 'is_platform_account']);
|
|
|
|
$bankCard = BankCard::where('user_id', $userId)->first(['bank_name', 'card_user_name']);
|
|
|
|
$bankCard = BankCard::where('user_id', $userId)->first(['id', 'bank_name', 'card_user_name']);
|
|
|
|
return $this->success(['username' => $account->username, 'userInfo' => $user, 'bankCard' => $bankCard]);
|
|
|
|
return $this->success(['username' => $account->username, 'userInfo' => $user, 'bankCard' => $bankCard]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|