彭俊 6 жил өмнө
parent
commit
24361ad47c

+ 7 - 1
Application/Api/Model/MoneyBuy.php

@@ -75,6 +75,7 @@ class MoneyBuy extends Model {
         if (empty($userInfo['identity'])) {
             Render([], '2001', lang('Common','Api') -> get('user does login'));
         }
+        
         // 用户ID
         $moneyBuySpxWhere['account_identity'] = $userInfo['identity'];
         // 时间区间
@@ -82,6 +83,7 @@ class MoneyBuy extends Model {
         $endTime = isset($_POST['endTime'])? $_POST['endTime'] : '3000-12-12 00:00:00';
         $moneyBuySpxBetween = ['money_time' => [$startTime, $endTime]];
         $moneyBuySpxMdl = lm('money_buy_simplex', "commons");
+        
         // 获取订单记录
         $moneyBuySpxSlt = ['batch_id', 'order_id'];
         $getMoneyBuySpx = $moneyBuySpxMdl -> moneyBuySimplex($moneyBuySpxSlt, $moneyBuySpxWhere, $moneyBuySpxBetween, '', '', 1);
@@ -98,6 +100,7 @@ class MoneyBuy extends Model {
 
             return $result;
         }
+        
         foreach ($allBatchId as $key => $value) {
             $moneyBuyMthOr[0][$key][0] = 'batch_id';
             $moneyBuyMthOr[0][$key][1] = $value['batch_id'];
@@ -120,17 +123,20 @@ class MoneyBuy extends Model {
             $moneyBuyMthOr[1][0][0] = 'result';
             $moneyBuyMthOr[1][0][1] = 0;
         }
+        
         // 当前页
         $currentPage = isset($_POST['currentPage']) ? $_POST['currentPage'] : "1";
         // 分页大小
         $pageSize = isset($_POST['pageSize']) ? $_POST['pageSize'] : "10";
         // 起始查询位置
         $begin = ($currentPage - 1) * $pageSize;
+        
         // 获取注单
         $moneyBuyMthMdl = lm('Money_buy_match', "commons");
-        $moneyBuyMthSlt = ['status', 'bet_money', 'matchResult', 'result', 'home_team',  'batch_id', 'guest_team', 'condition', 'ctime', 'odds', 'odds_name', 'match_id', 'money_buy_match.game_code', 'money_buy_match.odds_code'];
+        $moneyBuyMthSlt = ['status', 'bet_money', 'matchresult', 'result', 'home_team',  'batch_id', 'guest_team', 'condition', 'ctime', 'odds', 'odds_name', 'match_id', 'money_buy_match.game_code', 'money_buy_match.odds_code'];
         $getMoneyBuyMth = $moneyBuyMthMdl -> moneyBuyMatch($moneyBuyMthSlt, $moneyBuyMthWhere, $moneyBuyMthOr, $begin, $pageSize);
         $allCount = $moneyBuyMthMdl -> moneyBuyMatchTotal($moneyBuyMthWhere, $moneyBuyMthOr);
+        
         // 获取所有的比赛类型
         $stGameTypeMdl = lm('StGameType', "commons");
         $StGameTypeSlt = ['game_code'];