|
@@ -54,10 +54,10 @@ class WithDrawInfoController
|
|
|
$UserID=$user->UserID;
|
|
$UserID=$user->UserID;
|
|
|
|
|
|
|
|
|
|
|
|
|
- $paypass = $request->input('paypass');
|
|
|
|
|
- if (!empty($user->InsurePass)&&!Hash::check($paypass,$user->InsurePass)) {
|
|
|
|
|
- return apiReturnFail(['web.user.paypass_fail', 'A senha original está errada, digite-a novamente.'], '', 2);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// $paypass = $request->input('paypass');
|
|
|
|
|
+// if (!empty($user->InsurePass)&&!Hash::check($paypass,$user->InsurePass)) {
|
|
|
|
|
+// return apiReturnFail(['web.user.paypass_fail', 'A senha original está errada, digite-a novamente.'], '', 2);
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
$list=DB::table('QPAccountsDB.dbo.OrderWithDraw')
|
|
$list=DB::table('QPAccountsDB.dbo.OrderWithDraw')
|
|
|
->where('UserID', $UserID)
|
|
->where('UserID', $UserID)
|
|
@@ -176,34 +176,34 @@ class WithDrawInfoController
|
|
|
}
|
|
}
|
|
|
public function saveCpf(Request $request)
|
|
public function saveCpf(Request $request)
|
|
|
{
|
|
{
|
|
|
- $user = $request->user();
|
|
|
|
|
- $UserID=$user->UserID;
|
|
|
|
|
-
|
|
|
|
|
- $account = $request->Account ?: '';
|
|
|
|
|
- $phone = $request->Phone ?: '';
|
|
|
|
|
- $email = $request->Email ?: '';
|
|
|
|
|
- $PixNum = $request->PixNum ?: '';
|
|
|
|
|
-
|
|
|
|
|
- if(!Util::validateCpf($PixNum)){
|
|
|
|
|
- return apiReturnFail(['withdraw.account.tip.cpf_error','Cpf error format']);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $redisKey = 'Api_updateAccountsPayInfo_'.$UserID;
|
|
|
|
|
- $lock = SetNXLock::getExclusiveLock($redisKey);
|
|
|
|
|
- if (!$lock) {
|
|
|
|
|
- return apiReturnFail(['web.withdraw.try_again_later','Tente novamente mais tarde']);
|
|
|
|
|
- }
|
|
|
|
|
- $exist = DB::table(TableName::QPAccountsDB() . 'AccountWithDrawInfo')->where('UserID', $UserID)->first();
|
|
|
|
|
-
|
|
|
|
|
- if ($exist) {
|
|
|
|
|
- DB::table(TableName::QPAccountsDB() . 'AccountWithDrawInfo')->where('UserID', $UserID)->update(['PixNum' => $PixNum]);
|
|
|
|
|
- } else {
|
|
|
|
|
-
|
|
|
|
|
- $data = ['BankUserName' => $account, 'PhoneNumber' => $phone, 'EmailAddress' => $email, 'UserID' => $UserID, 'PixNum' => $PixNum, 'Achieves' => '', 'HistoryWithDraw' => 0];
|
|
|
|
|
- DB::table(TableName::QPAccountsDB() . 'AccountWithDrawInfo')
|
|
|
|
|
- ->insert($data);
|
|
|
|
|
- }
|
|
|
|
|
- SetNXLock::release($redisKey);
|
|
|
|
|
|
|
+// $user = $request->user();
|
|
|
|
|
+// $UserID=$user->UserID;
|
|
|
|
|
+//
|
|
|
|
|
+// $account = $request->Account ?: '';
|
|
|
|
|
+// $phone = $request->Phone ?: '';
|
|
|
|
|
+// $email = $request->Email ?: '';
|
|
|
|
|
+// $PixNum = $request->PixNum ?: '';
|
|
|
|
|
+//
|
|
|
|
|
+// if(!Util::validateCpf($PixNum)){
|
|
|
|
|
+// return apiReturnFail(['withdraw.account.tip.cpf_error','Cpf error format']);
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// $redisKey = 'Api_updateAccountsPayInfo_'.$UserID;
|
|
|
|
|
+// $lock = SetNXLock::getExclusiveLock($redisKey);
|
|
|
|
|
+// if (!$lock) {
|
|
|
|
|
+// return apiReturnFail(['web.withdraw.try_again_later','Tente novamente mais tarde']);
|
|
|
|
|
+// }
|
|
|
|
|
+// $exist = DB::table(TableName::QPAccountsDB() . 'AccountWithDrawInfo')->where('UserID', $UserID)->first();
|
|
|
|
|
+//
|
|
|
|
|
+// if ($exist) {
|
|
|
|
|
+// DB::table(TableName::QPAccountsDB() . 'AccountWithDrawInfo')->where('UserID', $UserID)->update(['PixNum' => $PixNum]);
|
|
|
|
|
+// } else {
|
|
|
|
|
+//
|
|
|
|
|
+// $data = ['BankUserName' => $account, 'PhoneNumber' => $phone, 'EmailAddress' => $email, 'UserID' => $UserID, 'PixNum' => $PixNum, 'Achieves' => '', 'HistoryWithDraw' => 0];
|
|
|
|
|
+// DB::table(TableName::QPAccountsDB() . 'AccountWithDrawInfo')
|
|
|
|
|
+// ->insert($data);
|
|
|
|
|
+// }
|
|
|
|
|
+// SetNXLock::release($redisKey);
|
|
|
return apiReturnSuc();
|
|
return apiReturnSuc();
|
|
|
}
|
|
}
|
|
|
public function MexWithDrawInfo(Request $request)
|
|
public function MexWithDrawInfo(Request $request)
|