Ken 2 weeks ago
parent
commit
201ba3d4a8
4 changed files with 77 additions and 26 deletions
  1. 21 21
      app/Services/BetService.php
  2. 19 1
      lang/en/messages.php
  3. 18 1
      lang/vi/messages.php
  4. 19 3
      lang/zh/messages.php

+ 21 - 21
app/Services/BetService.php

@@ -174,8 +174,8 @@ class BetService extends BaseService
 
         $serviceAccount = Config::where('field', 'service_customer')->first()->val;
         if ($betResult == null) {
-            $text = "消息格式错误!\n";
-            $text .= "任何疑问都可以联系唯一客服:@{$serviceAccount}";
+            $text = lang("消息格式错误!")."\n";
+            $text .= lang("任何疑问都可以联系唯一客服").":@{$serviceAccount}";
             $msg['text'] = $text;
             if ($messageId) {
                 $msg['reply_to_message_id'] = $messageId;
@@ -188,8 +188,8 @@ class BetService extends BaseService
 
         $gameplayRuleInfo = GameplayRuleService::getGameplayRules($keywords);
         if ($gameplayRuleInfo == null) {
-            $text = "玩法未配置!\n";
-            $text .= "任何疑问都可以联系唯一财务:@{$serviceAccount}";
+            $text = lang("玩法未配置!")."\n";
+            $text .= lang("任何疑问都可以联系唯一财务").":@{$serviceAccount}";
             $msg['text'] = $text;
             if ($messageId) {
                 $msg['reply_to_message_id'] = $messageId;
@@ -198,8 +198,8 @@ class BetService extends BaseService
         }
 
         if ($gameplayRuleInfo['odds'] <= 0) {
-            $text = "赔率为0 庄家通吃 禁止投注!\n";
-            $text .= "任何疑问都可以联系唯一财务:@{$serviceAccount}";
+            $text = lang("赔率为0 庄家通吃 禁止投注!")."\n";
+            $text .= lang("任何疑问都可以联系唯一财务").":@{$serviceAccount}";
             $msg['text'] = $text;
             if ($messageId) {
                 $msg['reply_to_message_id'] = $messageId;
@@ -213,7 +213,7 @@ class BetService extends BaseService
         if (empty($issueInfo)) {
             $issueCloseInfo = IssueService::model()::where('status', IssueService::model()::STATUS_CLOSE)->orderBy('id', 'desc')->first();
             if (empty($issueCloseInfo)) {
-                $text = "暂无可下注期数,本次下注无效!\n";
+                $text = lang("暂无可下注期数,本次下注无效!")."\n";
 
                 $msg['text'] = $text;
                 if ($messageId) {
@@ -221,7 +221,7 @@ class BetService extends BaseService
                 }
                 return $msg;
             } else {
-                $text = "封盘中,本次下注无效!\n";
+                $text = lang("封盘中,本次下注无效!")."\n";
 
                 $msg['text'] = $text;
                 if ($messageId) {
@@ -233,8 +233,8 @@ class BetService extends BaseService
 
 
         if (!is_numeric($amount) || $amount <= 0) {
-            $text = "投注金额格式不正确!\n";
-            $text .= "任何疑问都可以联系唯一财务:@{$serviceAccount}";
+            $text = lang("投注金额格式不正确!")."\n";
+            $text .= lang("任何疑问都可以联系唯一财务").":@{$serviceAccount}";
             $msg['text'] = $text;
             if ($messageId) {
                 $msg['reply_to_message_id'] = $messageId;
@@ -244,7 +244,7 @@ class BetService extends BaseService
 
         $now_date = date('Y-m-d H:i:s', time() + 30); // 提前30秒
         if ($issueInfo['end_time'] < $now_date) {
-            $text = "封盘中,本次下注无效!\n";
+            $text = lang("封盘中,本次下注无效!")."\n";
 
             $msg['text'] = $text;
             if ($messageId) {
@@ -255,7 +255,7 @@ class BetService extends BaseService
 
         // 投注限制校验
         if ($amount < $gameplayRuleInfo['mininum']) {
-            $text = "下注失败,最小金额限制{$gameplayRuleInfo['mininum']}\n";
+            $text = lang("下注失败,最小金额限制")."{$gameplayRuleInfo['mininum']}\n";
             $msg['text'] = $text;
             if ($messageId) {
                 $msg['reply_to_message_id'] = $messageId;
@@ -265,7 +265,7 @@ class BetService extends BaseService
 
         // 投注限制校验
         if ($amount > $gameplayRuleInfo['maxinum']) {
-            $text = "下注失败,最大金额限制{$gameplayRuleInfo['maxinum']}\n";
+            $text = lang("下注失败,最大金额限制")."{$gameplayRuleInfo['maxinum']}\n";
             $msg['text'] = $text;
             if ($messageId) {
                 $msg['reply_to_message_id'] = $messageId;
@@ -279,7 +279,7 @@ class BetService extends BaseService
 
         // 余额计算
         if ($balance < $amount) {
-            $text = "余额不足,本次下注无效!\n";
+            $text = lang("余额不足,本次下注无效!\n");
             $msg['text'] = $text;
             if ($messageId) {
                 $msg['reply_to_message_id'] = $messageId;
@@ -344,21 +344,21 @@ class BetService extends BaseService
 
         // }
 
-        $text = "下注期数:{$issueInfo->issue_no}\n";
-        $text .= "下注内容\n";
+        $text = lang('下注期数').":{$issueInfo->issue_no}\n";
+        $text .= lang("下注内容")."\n";
         $text .= "--------\n";
         $text .= "{$input}\n";
         $text .= "--------\n";
-        $text .= "下注成功\n";
+        $text .= lang("下注成功")."\n";
         $msg['text'] = $text;
 
         // $lastStr = self::getLastChar($userInfo->first_name, 1);
         $lastStr = self::hideMiddleDigits($userInfo->member_id, 4);
 
-        $groupText = "";
-        $groupText .= "会员下注 【" . $lastStr . "】 \n";
-        $groupText .= "下注期数:{$issueInfo->issue_no} \n";
-        $groupText .= "下注内容: \n";
+
+        $groupText = lang("会员下注")." 【" . $lastStr . "】 \n";
+        $groupText .= lang('下注期数').":{$issueInfo->issue_no} \n";
+        $groupText .= lang("下注内容").": \n";
         $groupText .= "----------- \n";
         $groupText .= "{$input} \n";
         $groupText .= "----------- \n";

+ 19 - 1
lang/en/messages.php

@@ -268,7 +268,25 @@ return [
     "等待开奖" => "Waiting for the lottery draw",
     "期号不存在" => "Issue Number Does Not Exist",
     "期号状态不正确" => "Incorrect Issue Number Status",
-    "开始下注" => "Start Betting"
+    "开始下注" => "Start Betting",
+    "下注期数" => "Betting Round",
+    "下注内容" => "Bet Content",
+    "下注成功" => "Betting Successful",
+    "会员下注" => "Member Betting",
+    "余额不足,本次下注无效!\n" => "Insufficient Balance, This Bet Is Invalid!\n",
+    "下注失败,最大金额限制" => "Bet Failed, Maximum Amount Limit",
+    "下注失败,最小金额限制" => "Bet Failed, Minimum Amount Limit",
+    "封盘中,本次下注无效!" => "Betting Closed, This Bet Is Invalid!",
+    "投注金额格式不正确!" => "Bet Amount Format Incorrect!",
+    "任何疑问都可以联系唯一财务" => "For Any Questions, Contact the Sole Finance",
+    "暂无可下注期数,本次下注无效!" => "No Available Betting Rounds, This Bet Is Invalid!",
+    "赔率为0 庄家通吃 禁止投注!" => "Odds Are 0, Banker Takes All, Betting Forbidden!",
+    "玩法未配置!" => "Gameplay Not Configured!",
+    "消息格式错误!" => "Message Format Error!",
+    "任何疑问都可以联系唯一客服" => "For Any Questions, Contact the Sole Customer Service"
+
+
+
 
 
 ];

+ 18 - 1
lang/vi/messages.php

@@ -268,7 +268,24 @@ return [
     "等待开奖" => "Chờ giải thưởng",
     "期号不存在" => "Mã số kỳ không tồn tại",
     "期号状态不正确" => "Trạng thái mã số kỳ không chính xác",
-    "开始下注" => "Bắt đầu cược"
+    "开始下注" => "Bắt đầu cược",
+    "下注期数" => "Số vòng cược",
+    "下注内容" => "Nội dung cược",
+    "下注成功" => "Cược thành công",
+    "会员下注" => "Thành viên đặt cược",
+    "余额不足,本次下注无效!\n" => "Số dư không đủ, cược này không hợp lệ!\n",
+    "下注失败,最大金额限制" => "Đặt cược thất bại, vượt giới hạn số tiền tối đa",
+    "下注失败,最小金额限制" => "Đặt cược thất bại, dưới giới hạn số tiền tối thiểu",
+    "封盘中,本次下注无效!" => "Đang đóng cược, cược này không hợp lệ!",
+    "投注金额格式不正确!" => "Định dạng số tiền cược không đúng!",
+    "任何疑问都可以联系唯一财务" => "Mọi thắc mắc có thể liên hệ bộ phận tài chính duy nhất",
+    "暂无可下注期数,本次下注无效!" => "Hiện không có vòng cược nào, cược này không hợp lệ!",
+    "赔率为0 庄家通吃 禁止投注!" => "Tỷ lệ cược bằng 0, nhà cái thắng toàn bộ, cấm đặt cược!",
+    "玩法未配置!" => "Cách chơi chưa được cấu hình!",
+    "消息格式错误!" => "Định dạng tin nhắn sai!",
+    "任何疑问都可以联系唯一客服" => "Mọi thắc mắc có thể liên hệ bộ phận chăm sóc khách hàng duy nhất"
+
+
 
 
 

+ 19 - 3
lang/zh/messages.php

@@ -266,8 +266,24 @@ return [
     "下注总额" => "下注总额",
     "开奖状态" => "开奖状态",
     "等待开奖" => "等待开奖",
-    "期号不存在"=>"期号不存在",
-    '期号状态不正确'=>'期号状态不正确',
-    '开始下注'=>'开始下注',
+    "期号不存在" => "期号不存在",
+    '期号状态不正确' => '期号状态不正确',
+    '开始下注' => '开始下注',
+    "下注期数" => "下注期数",
+    "下注内容" => "下注内容",
+    "下注成功" => "下注成功",
+    "会员下注" => "会员下注",
+    "余额不足,本次下注无效!\n" => "余额不足,本次下注无效!\n",
+    "下注失败,最大金额限制" => "下注失败,最大金额限制",
+    "下注失败,最小金额限制" => "下注失败,最小金额限制",
+    "封盘中,本次下注无效!" => "封盘中,本次下注无效!",
+    "投注金额格式不正确!" => "投注金额格式不正确!",
+    "任何疑问都可以联系唯一财务" => "任何疑问都可以联系唯一财务",
+    "暂无可下注期数,本次下注无效!" => "暂无可下注期数,本次下注无效!",
+    "赔率为0 庄家通吃 禁止投注!" => "赔率为0 庄家通吃 禁止投注!",
+    "玩法未配置!" => "玩法未配置!",
+    "消息格式错误!" => "消息格式错误!",
+    "任何疑问都可以联系唯一客服" => "任何疑问都可以联系唯一客服",
+
 
 ];