彭俊 il y a 6 ans
Parent
commit
b584b51133

+ 8 - 4
Application/Api/Model/MoneyBuy.php

@@ -364,15 +364,19 @@ class MoneyBuy extends Model {
 
             return $result;
         }
+        // foreach ($allBatchId as $key => $value) {
+        //     $moneyBuyMthOr[0][$key][0] = 'batch_id';
+        //     $moneyBuyMthOr[0][$key][1] = $value['batch_id'];
+        // }
         foreach ($allBatchId as $key => $value) {
-            $moneyBuyMthOr[0][$key][0] = 'batch_id';
-            $moneyBuyMthOr[0][$key][1] = $value['batch_id'];
+            $moneyBuyMthOr[0][$key][0] = 'order_id';
+            $moneyBuyMthOr[0][$key][1] = $value['order_id'];
         }
       
         // 获取注单
         $moneyBuyMthWhere['bet_type'] = 2;
         $moneyBuyMthMdl = lm('Money_buy_match', "commons");
-        $moneyBuyMthSlt = ['status', 'matchresult', 'bet_money', 'home_team', 'guest_team', 'condition', 'odds', 'odds_name', 'match_id', 'batch_id', 'money_buy_match.game_code', 'money_buy_match.odds_code'];
+        $moneyBuyMthSlt = ['status', 'matchresult', 'bet_money', 'home_team', 'guest_team', 'condition', 'odds', 'odds_name', 'match_id', 'batch_id','order_id', 'money_buy_match.game_code', 'money_buy_match.odds_code'];
         $getMoneyBuyMth = $moneyBuyMthMdl -> moneyBuyMatch($moneyBuyMthSlt, $moneyBuyMthWhere, $moneyBuyMthOr, $begin, $pageSize);
         // 获取所有的比赛类型
         $stGameTypeMdl = lm('StGameType', "commons");
@@ -453,7 +457,7 @@ class MoneyBuy extends Model {
                 $getMoneyBuyStr[$key]->winMoney = 0;
             }
             foreach ($getMoneyBuyMth as $k => $v) {
-                if ($value['batch_id'] == $v['batch_id']) {
+                if ($value['order_id'] == $v['order_id']) {
                     $getMoneyBuyStr[$key]['money_buy'][] = $v;
                 }
             }

+ 1 - 1
Application/Commons/Model/Money_buy_match.php

@@ -26,7 +26,7 @@ class Money_buy_match extends Model {
      * @return array JsonString
      */
    
-    public function moneyBuyMatch($select, $where = '', $orWhere = '', $begin = '', $pageSize = '', $orderBy = ['batch_id' => 'desc']) {
+    public function moneyBuyMatch($select, $where = '', $orWhere = '', $begin = '', $pageSize = '', $orderBy = ['order_id' => 'desc']) {
         // 查询字段
         $result = $this -> select($select)
         ->join('st_odds_code', function ($join) {