master
ljl 1 year ago
parent b2da675492
commit 7d8765e977

@ -4,6 +4,8 @@ declare(strict_types=1);
namespace App\Controller\Payment;
use App\Exception\BusinessException;
use App\Model\User;
use App\Request\BindCardRequest;
use App\Request\RegisterRequest;
use App\Request\UnbindCardRequest;
@ -103,7 +105,11 @@ class PaymentController extends AbstractController
public function queryBindCards(RequestInterface $request)
{
[$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class);
$this->userService->rsyncBankCards($data['userId']);
$user = User::where('app_id', $app->app_id)->where('user_id', $data['userId'])->first();
if (empty($user)) {
throw new BusinessException('用户不存在');
}
$this->userService->rsyncBankCards($user->member_id);
$records = $this->userService->getUserBankCards($data['userId'], $app);
return $this->success(['result' => $records]);
}

Loading…
Cancel
Save