diff --git a/app/Controller/Payment/AccountController.php b/app/Controller/Payment/AccountController.php index 21b9bc3..daffd70 100644 --- a/app/Controller/Payment/AccountController.php +++ b/app/Controller/Payment/AccountController.php @@ -231,7 +231,7 @@ class AccountController extends AbstractController { $userInfo = $this->checkUser($request); $userId = $this->resetUserId($userInfo['userId']); - $query = Order::query()->with('user'); + $query = Order::query()->with('user')->where('is_account_pay', 1); if ($userId != 'ACT_5') { $query->where('user_id', $userId); } @@ -309,6 +309,6 @@ class AccountController extends AbstractController ]; } - return $this->success(['records' => $records, 'total' => $total, 'amount' => $amount]); + return $this->success(['records' => $records, 'total' => $total, 'amount' => number_format($amount / 100, 2, '.', '')]); } } diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index 60f802b..802d3e7 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -221,6 +221,7 @@ class PaymentService extends AbstractService $order->bank_code = $bankCard->bank_code; $order->card_type = $bankCard->card_type; $order->cnaps_code = $bankCard->cnaps_code; + $order->is_account_pay = isset($params['isAccountPay']) && $params['isAccountPay'] ? 1 :0; $order->save(); $platformAccount = User::getPlatformAccount($params['isAccountPay']);