diff --git a/app/Controller/Payment/PaymentController.php b/app/Controller/Payment/PaymentController.php index 8097e70..6df5a6b 100644 --- a/app/Controller/Payment/PaymentController.php +++ b/app/Controller/Payment/PaymentController.php @@ -119,4 +119,23 @@ class PaymentController extends AbstractController $records = $this->userService->getUserBankCards($data['userId'], $app); return $this->success(['result' => $records]); } + + public function queryUser(RequestInterface $request) + { + [$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class); + $user = User::where('app_id', $app->app_id)->where('user_id', $data['userId'])->first(); + if (empty($user)) { + throw new BusinessException('用户不存在'); + } + $user = $this->userService->rsyncUser($user->member_id); + $result = [ + 'realnameFlag' => $user->realname_flag; + 'bindCardFlag' => $user->bind_bard_flag; + 'setPwdFlag' => $user->set_pwd_flag; + 'email' => $user->email; + 'mobile' => $user->mobile; + 'certificateNo' => $user->certificate_no; + ]; + return $this->success($result); + } } diff --git a/config/routes.php b/config/routes.php index ba7896c..6219132 100644 --- a/config/routes.php +++ b/config/routes.php @@ -19,7 +19,9 @@ Router::addGroup('/payment',function () { Router::post('/pwd-forget', [PaymentController::class, 'pwdForget']); Router::post('/pwd-modify', [PaymentController::class, 'pwdModify']); Router::post('/payment', [PaymentController::class, 'payment']); + Router::post('/transfer-pay', [PaymentController::class, 'transferPay']); Router::post('/query-bind-cards', [PaymentController::class, 'queryBindCards']); + Router::post('/query-user', [PaymentController::class, 'queryUser']); Router::post('/refund-apply', [PaymentController::class, 'refundApply']); Router::post('/refund-confirm', [PaymentController::class, 'refundConfirm']); Router::post('/refund-cancel', [PaymentController::class, 'refundCancel']);