Ken hai 2 meses
pai
achega
e894a837d8
Modificáronse 1 ficheiros con 17 adicións e 0 borrados
  1. 17 0
      app/Services/WithdrawService.php

+ 17 - 0
app/Services/WithdrawService.php

@@ -487,6 +487,23 @@ class WithdrawService
         }
         $wallet = Wallet::where('member_id', $chatId)->first();
         $temp = floatval($wallet->available_balance);
+
+        if ($amount < 100) {
+            return [
+                'chat_id' => $chatId,
+                'text' => "⚠️提现不能少于100 RMB,请重试",
+                'reply_to_message_id' => $messageId
+            ];
+        }
+        if ($amount > 49999) {
+            return [
+                'chat_id' => $chatId,
+                'text' => "⚠️最多提现 49999 RMB,请重试",
+                'reply_to_message_id' => $messageId
+            ];
+        }
+
+
         return [
             'chat_id' => $chatId,
             'text' => "金额输入不正确,ttttttt",