|
|
|
@ -105,6 +105,31 @@ class UserService extends AbstractService
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getUserBankCards($userId, App $app)
|
|
|
|
|
{
|
|
|
|
|
$bankCards = BankCard::where('app_id', $app->app_id)->where('user_id', $userId)->get();
|
|
|
|
|
$records = [];
|
|
|
|
|
foreach ($bankCards as $bankCard) {
|
|
|
|
|
$records[] = [
|
|
|
|
|
'agreementNo' => $bankCard->agreement_no,
|
|
|
|
|
'cardUserName' => $bankCard->card_user_name,
|
|
|
|
|
'lastCardNo' => $bankCard->last_card_no,
|
|
|
|
|
'bankMobile' => $bankCard->bank_mobile,
|
|
|
|
|
'bankCode' => $bankCard->bank_code,
|
|
|
|
|
'bankName' => $bankCard->bank_name,
|
|
|
|
|
'cardType' => $bankCard->card_type,
|
|
|
|
|
'cnapsCode' => $bankCard->cnaps_code,
|
|
|
|
|
'publicFlag' => $bankCard->public_flag,
|
|
|
|
|
'repaymentDate' => $bankCard->repayment_date,
|
|
|
|
|
'mainFlag' => $bankCard->main_flag,
|
|
|
|
|
'status' => $bankCard->status,
|
|
|
|
|
'avaFlag' => $bankCard->ava_flag,
|
|
|
|
|
'remark' => $bankCard->remark,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
return $records;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function saveBankCard(array $data, User $user)
|
|
|
|
|
{
|
|
|
|
|
$appId = $user->app_id;
|
|
|
|
|