彭俊 6 жил өмнө
parent
commit
9ffe77754d

+ 16 - 5
Application/Api/Controller/Betorder.php

@@ -267,12 +267,12 @@ class Betorder extends BaseController{
                     'is_champion' => $is_champion?:0,//1 冠军投注 0普通赛事投注
                 ];
                  //插入数据源
-             $moneyBuyMatch = lm('MoneyBuyMatch','Api')->insert($matchData);
-             if(!$moneyBuyMatch){
-                 Render('','3205',lang('errors','Api')->get('error-3205'));
-             }
+                $moneyBuyMatch = lm('MoneyBuyMatch','Api')->insert($matchData);
+                if(!$moneyBuyMatch){
+                    Render('','3205',lang('errors','Api')->get('error-3205'));
+                }
             }
-            
+            $order = [];
             $order =[
                 'info_identity' => $UUID,
                 'account_name' => $userInfo['account'],
@@ -288,6 +288,17 @@ class Betorder extends BaseController{
                 'money_time' => $this->time,
                 'is_champion' => $is_champion?:0,//1 冠军投注 0普通赛事投注
             ];
+
+            //如果是冠军投注,追加字段
+            if($is_champion == 1){
+                $json_single_result = [
+                    'lg_id'=> '',
+                    'game_name' => '',
+                    'result' => '',
+                    'updatetime' => '',
+                ];
+                $order['single_result'] = json_encode($json_single_result);
+            }
             $insert = lm("MoneyBuySimplex",'Api')->insert($order);
             if(!$insert){
                 Render('','3205',lang('errors','Api')->get('error-3205'));