Ken 1 месяц назад
Родитель
Сommit
8f5dac1315
1 измененных файлов с 15 добавлено и 14 удалено
  1. 15 14
      app/Services/QianBaoWithdrawService.php

+ 15 - 14
app/Services/QianBaoWithdrawService.php

@@ -20,7 +20,7 @@ class QianBaoWithdrawService
      * @param $messageId
      * @throws \Telegram\Bot\Exceptions\TelegramSDKException
      */
-    static function init(Api $telegram, $data, $chatId, $firstName, $messageId)
+    public static function init(Api $telegram, $data, $chatId, $firstName, $messageId)
     {
         //点击钱宝提现按钮
         if ($data === "withdraw@@qb_apply") {
@@ -92,7 +92,7 @@ class QianBaoWithdrawService
 
     }
 
-    static function onMessage($chatId, $text, $messageId,$stepStatus)
+    public static function onMessage($chatId, $text, $messageId, $stepStatus)
     {
         switch ($stepStatus) {
             case StepStatus::INPUT_WITHDRAW_QB_MONEY://输入提现金额
@@ -114,7 +114,8 @@ class QianBaoWithdrawService
         return null;
     }
 
-    static function bill($chatId, $firstName, $messageId, $page = 1, $limit = 5)
+    //钱宝账单
+    private static function bill($chatId, $firstName, $messageId, $page = 1, $limit = 5)
     {
         $list = PaymentOrder::where('member_id', $chatId)
             ->where('type', 2)
@@ -174,7 +175,7 @@ class QianBaoWithdrawService
     }
 
     //1.钱宝提现
-    static function qbApply($chatId, $messageId)
+    private static function qbApply($chatId, $messageId)
     {
         $three_payment_switch = Config::where('field', 'three_payment_switch')->first()->val;
         if ($three_payment_switch != 1) {
@@ -198,7 +199,7 @@ class QianBaoWithdrawService
     }
 
     //2.输入钱宝提现金额
-    static function inputQbAmount($chatId, $amount, $messageId)
+    private static function inputQbAmount($chatId, $amount, $messageId)
     {
         if (!preg_match('/^\d+(\.\d{1,2})?$/', $amount)) {
             return [
@@ -260,7 +261,7 @@ class QianBaoWithdrawService
     }
 
     //3.选择银行卡号
-    static function chooseBank($chatId, $id)
+    private static function chooseBank($chatId, $id)
     {
         $amount = Cache::get("{$chatId}_WITHDRAW_QB_MONEY", '');
         if (!$amount) return WalletService::getBalance($chatId);
@@ -276,7 +277,7 @@ class QianBaoWithdrawService
     }
 
     //银行卡管理
-    static function banks($chatId, $messageId)
+    private static function banks($chatId, $messageId)
     {
         $text = "🏠 银行卡管理\n";
         $text .= "--------------------------\n";
@@ -301,7 +302,7 @@ class QianBaoWithdrawService
     }
 
     //删除银行卡
-    static function bankDelete($chatId, $messageId, $id)
+    private static function bankDelete($chatId, $messageId, $id)
     {
         Bank::where('id', $id)
             ->where('member_id', $chatId)->delete();
@@ -310,7 +311,7 @@ class QianBaoWithdrawService
     }
 
     //银行卡详情
-    static function bankDetails($chatId, $messageId, $id)
+    private static function bankDetails($chatId, $messageId, $id)
     {
 
         $text = "*银行卡管理*\n\n";
@@ -349,7 +350,7 @@ class QianBaoWithdrawService
         ];
     }
 
-    static function addBank($chatId, $messageId)
+    private static function addBank($chatId, $messageId)
     {
         $text = "请选择 提现通道\n";
 
@@ -370,7 +371,7 @@ class QianBaoWithdrawService
         ];
     }
 
-    static function chooseChannel($chatId, $messageId, $channel)
+    private static function chooseChannel($chatId, $messageId, $channel)
     {
         Cache::put("{$chatId}_QB_WITHDRAW_CHANNEL", $channel);
 
@@ -404,7 +405,7 @@ class QianBaoWithdrawService
 
     }
 
-    static function inputBankName($chatId, $bankName, $messageId)
+    private static function inputBankName($chatId, $bankName, $messageId)
     {
         Cache::put("{$chatId}_QB_WITHDRAW_BANK_NAME", $bankName);
         Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
@@ -415,7 +416,7 @@ class QianBaoWithdrawService
         ];
     }
 
-    static function inputCardNo($chatId, $cardNo, $messageId)
+    private static function inputCardNo($chatId, $cardNo, $messageId)
     {
         $channel = Cache::get("{$chatId}_QB_WITHDRAW_CHANNEL");
         if ($channel === 'DF001' && !preg_match('/^\d+$/', $cardNo)) {
@@ -437,7 +438,7 @@ class QianBaoWithdrawService
         ];
     }
 
-    static function inputAccount($chatId, $account, $messageId)
+    private static function inputAccount($chatId, $account, $messageId)
     {
         $channel = Cache::get("{$chatId}_QB_WITHDRAW_CHANNEL");
         $cardNo = Cache::get("{$chatId}_QB_WITHDRAW_CARD_NO");