彭俊 6 rokov pred
rodič
commit
5e546675ec
1 zmenil súbory, kde vykonal 9 pridanie a 5 odobranie
  1. 9 5
      Application/Api/Model/MoneyBuy.php

+ 9 - 5
Application/Api/Model/MoneyBuy.php

@@ -250,7 +250,7 @@ class MoneyBuy extends Model {
         // 循环添加玩法和判断玩法是否可加注
         foreach ($getMoneyBuyMth as $key => $value) {
             $getMoneyBuyMth[$key]->willMoney = $value->bet_money * $value->odds;
-            if ($value->result and $value->order_status < 2 and $value->settle_status > 1) {
+            if ($value->result and $value->order_status < 2 and $value->settle_status >1) {
                 switch (intval($value->result)) {
                     case 1:
                         $oddsDiscount = 1 + $value->odds;
@@ -551,6 +551,7 @@ class MoneyBuy extends Model {
         // 用户ID
         // $moneyBuyWhere['account_identity'] = $userInfo['identity'];
         // 时间区间
+
         $endTime = date('Y-m-d H:i:s');
         if ($userInfo['statisticsTime']) {
             $startTime = $userInfo['statisticsTime'];
@@ -562,9 +563,10 @@ class MoneyBuy extends Model {
         $moneyRecordWhere['settle_status'] = 2;
         $moneyBuyWhere = [
             ['account_identity','=',$userInfo['identity']],
-            ['money_time','>',$startTime],
-            ['money_time','<',$endTime],
+            // ['money_time','>',$startTime],
+            // ['money_time','<',$endTime],
         ];
+
         // 获取单式投注订单
         $moneyBuySimplex = lm('money_buy_simplex', "commons");
         $mnyBuySpxData = $moneyBuySimplex
@@ -579,8 +581,8 @@ class MoneyBuy extends Model {
         $allBatchId = array_unique($mnyBuySpxData, SORT_REGULAR);
         if ($allBatchId) {
             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'] = 1;
             // 获取注单
@@ -597,6 +599,7 @@ class MoneyBuy extends Model {
             ->where($moneyBuyWhere)
             // ->whereBetween('settlementTime', $moneyBuyBetween)
             ->get();
+
         $winMoney = $userInfo['allWin'];
         $loseMoney = $userInfo['allLose'];
         // 单式盈利.
@@ -612,6 +615,7 @@ class MoneyBuy extends Model {
                 $loseMoney += $value->bet_money;
             }
         }
+
         // 串式盈利.
         foreach ($mnyBuyStrData as $key => $value) {
             // 判断订单是否盈利