3
0

95 Revīzijas b4a9a67964 ... 679d3d9c91

Autors SHA1 Ziņojums Datums
  彭俊 679d3d9c91 异常处理了 6 gadi atpakaļ
  彭俊 8b300cb13d 异常处理 6 gadi atpakaļ
  彭俊 f066b576fb 异常处理 6 gadi atpakaļ
  彭俊 2672fab3dd 异常处理 6 gadi atpakaļ
  彭俊 8410b60ed2 异常处理 6 gadi atpakaļ
  彭俊 cdb7b8d607 异常处理 6 gadi atpakaļ
  彭俊 8c2452bb27 异常处理 6 gadi atpakaļ
  彭俊 afeaf9a029 1 6 gadi atpakaļ
  彭俊 d2adc064ba 1 6 gadi atpakaļ
  彭俊 1acf342a71 异常处理 6 gadi atpakaļ
  彭俊 cf7ff0ff65 异常处理 6 gadi atpakaļ
  彭俊 13705783da 异常处理 6 gadi atpakaļ
  彭俊 12d81b03da 异常处理 6 gadi atpakaļ
  彭俊 5c4cf8243d 异常处理 6 gadi atpakaļ
  彭俊 249115f50d 异常处理 6 gadi atpakaļ
  彭俊 ff38ddad36 异常处理 6 gadi atpakaļ
  彭俊 cd91221254 异常处理 6 gadi atpakaļ
  彭俊 08c8215741 异常处理 6 gadi atpakaļ
  彭俊 a5ee708299 异常处理 6 gadi atpakaļ
  彭俊 15166532ca 异常处理 6 gadi atpakaļ
  彭俊 39bc6e5f08 异常处理 6 gadi atpakaļ
  彭俊 3813dbaeab 异常处理 6 gadi atpakaļ
  彭俊 4e7e954425 异常处理 6 gadi atpakaļ
  彭俊 a878fa8e99 异常处理 6 gadi atpakaļ
  彭俊 f41d854a20 异常处理 6 gadi atpakaļ
  彭俊 b1bbf53620 异常处理 6 gadi atpakaļ
  彭俊 13294494c2 异常处理 6 gadi atpakaļ
  彭俊 60d85a2bef 异常处理 6 gadi atpakaļ
  彭俊 bbf9d60e53 异常处理 6 gadi atpakaļ
  彭俊 7e6a5c550e 异常处理 6 gadi atpakaļ
  彭俊 d95252fb80 异常处理 6 gadi atpakaļ
  彭俊 5e546675ec 异常处理 6 gadi atpakaļ
  彭俊 4f3eac651c 异常处理 6 gadi atpakaļ
  彭俊 030b5caf87 异常处理 6 gadi atpakaļ
  彭俊 f95388e761 异常处理 6 gadi atpakaļ
  彭俊 0f441ccffd 异常处理 6 gadi atpakaļ
  彭俊 9ad6af1198 异常处理 6 gadi atpakaļ
  彭俊 b0c4110432 异常处理 6 gadi atpakaļ
  彭俊 d6eb5ffa14 异常处理 6 gadi atpakaļ
  彭俊 89f2aeaf71 异常处理 6 gadi atpakaļ
  彭俊 9a98a838ab 异常处理 6 gadi atpakaļ
  彭俊 b584b51133 异常处理 6 gadi atpakaļ
  彭俊 fb3dcda738 异常处理 6 gadi atpakaļ
  彭俊 94e7e45707 异常处理 6 gadi atpakaļ
  彭俊 6415804c81 异常处理 6 gadi atpakaļ
  彭俊 9e94a03db6 异常处理 6 gadi atpakaļ
  彭俊 24781ffd32 异常处理 6 gadi atpakaļ
  彭俊 d4abb86fd7 异常处理 6 gadi atpakaļ
  彭俊 98d9cf3062 异常处理 6 gadi atpakaļ
  彭俊 5cba28d03e 异常处理 6 gadi atpakaļ
  彭俊 62730dc479 异常处理 6 gadi atpakaļ
  彭俊 47c0086487 异常处理 6 gadi atpakaļ
  彭俊 da36b6ff2f 异常处理 6 gadi atpakaļ
  彭俊 07ddbdc3a8 异常处理 6 gadi atpakaļ
  彭俊 2858a555f3 异常处理 6 gadi atpakaļ
  彭俊 a72fc60d4d 异常处理 6 gadi atpakaļ
  彭俊 3f3e8ab852 异常处理 6 gadi atpakaļ
  彭俊 b58e99f0b8 异常处理 6 gadi atpakaļ
  彭俊 4026e02cbe 异常处理 6 gadi atpakaļ
  彭俊 35d919b7e4 异常处理 6 gadi atpakaļ
  彭俊 ccc0a5e0f6 异常处理 6 gadi atpakaļ
  彭俊 01c0603982 异常处理 6 gadi atpakaļ
  彭俊 8684f1c57a 异常处理 6 gadi atpakaļ
  彭俊 afd3a5277f 异常处理 6 gadi atpakaļ
  彭俊 0c7e01ed60 异常处理 6 gadi atpakaļ
  彭俊 c8fe02ef94 异常处理 6 gadi atpakaļ
  彭俊 ad2eb77586 异常处理 6 gadi atpakaļ
  彭俊 8c8ded6b16 异常处理 6 gadi atpakaļ
  彭俊 a5e54bba40 异常处理 6 gadi atpakaļ
  彭俊 cd8cfdd925 异常处理 6 gadi atpakaļ
  彭俊 63656a8e4a 异常处理 6 gadi atpakaļ
  彭俊 265d2bd1e3 异常处理 6 gadi atpakaļ
  彭俊 d083fb1d1e 异常处理 6 gadi atpakaļ
  彭俊 d597392fe3 异常处理 6 gadi atpakaļ
  彭俊 e6dc03e142 异常处理 6 gadi atpakaļ
  彭俊 403afde5ae 异常处理 6 gadi atpakaļ
  彭俊 4f2446cbad 异常处理 6 gadi atpakaļ
  彭俊 7ba4fb26f2 异常处理 6 gadi atpakaļ
  彭俊 6ec348815d 异常处理 6 gadi atpakaļ
  彭俊 05af30867e 异常处理 6 gadi atpakaļ
  彭俊 946a131291 异常处理 6 gadi atpakaļ
  彭俊 5867492d4b 异常处理 6 gadi atpakaļ
  彭俊 44a7f7e3c8 异常处理 6 gadi atpakaļ
  彭俊 18c5461f15 异常处理 6 gadi atpakaļ
  彭俊 ad9c56fe13 异常处理 6 gadi atpakaļ
  彭俊 ec834a7c8d 异常处理 6 gadi atpakaļ
  彭俊 55023aa5e7 异常处理 6 gadi atpakaļ
  彭俊 c367a90c21 异常处理 6 gadi atpakaļ
  彭俊 91a036aa4d 追加用户撤单操作 6 gadi atpakaļ
  彭俊 cdad960637 异常处理 6 gadi atpakaļ
  彭俊 adace0e9d8 异常处理 6 gadi atpakaļ
  彭俊 7d37cf6d2f 异常处理 6 gadi atpakaļ
  彭俊 0412c7d58b 异常处理 6 gadi atpakaļ
  彭俊 97033f0373 追加赛事规则接口 6 gadi atpakaļ
  彭俊 2d4f87bd7b 详细赔率限定玩法 6 gadi atpakaļ
100 mainītis faili ar 1555 papildinājumiem un 171 dzēšanām
  1. 545 42
      Application/Api/Controller/Betorder.php
  2. 1 1
      Application/Api/Controller/UserBuy.php
  3. 168 33
      Application/Api/Model/MoneyBuy.php
  4. 1 1
      Application/Api/Model/MoneyRecharge.php
  5. 69 1
      Application/Commons/Model/Money_buy_match.php
  6. 1 0
      Application/Commons/Model/Money_buy_str.php
  7. 1 1
      Application/Commons/Model/St_competition.php
  8. 3 1
      Application/Sports/Controller/Head.php
  9. 12 2
      Application/Sports/Controller/MatchList.php
  10. 118 8
      Application/Sports/Controller/MatchListWeb.php
  11. 310 0
      Application/Sports/Controller/MatchVer.php
  12. 15 1
      Application/Sports/Controller/ResultMatch.php
  13. 85 0
      Application/Sports/Controller/RuleMatch.php
  14. 7 0
      Application/Sports/Lang/Errors.php
  15. 5 5
      Application/Sports/Lang/GameTypes.php
  16. 7 0
      Application/Sports/Lang/Tips.php
  17. 14 0
      Application/Sports/Model/St_match_rule.php
  18. 14 0
      Application/Sports/Model/St_match_rule_group.php
  19. 2 0
      Application/Sports/Model/St_zq_competition.php
  20. 3 0
      Biz/Account/AccountManager.php
  21. 1 1
      Biz/Account/Repository/AccountRepository.php
  22. 91 34
      Biz/Common/CommonFunction.php
  23. 2 4
      Biz/Db/Redis/RedisOP.php
  24. 7 0
      Biz/Match/GetOddsData.php
  25. 14 4
      Biz/Match/GetmatchData.php
  26. 25 0
      Config/Redis.php
  27. 4 2
      vendor/illuminate/support/Testing/Fakes/QueueFake.php
  28. 30 30
      web/index.html
  29. 0 0
      web/static/css/app.0642c2e9d28005bfab8bb465c133d316.css
  30. 0 0
      web/static/css/app.0642c2e9d28005bfab8bb465c133d316.css.map
  31. 0 0
      web/static/css/app.06a7f27a8be5ec6314ebc5e87600ad79.css
  32. 0 0
      web/static/css/app.06a7f27a8be5ec6314ebc5e87600ad79.css.map
  33. 0 0
      web/static/css/app.1372b9fc99cdf3006054b07173fef090.css
  34. 0 0
      web/static/css/app.1372b9fc99cdf3006054b07173fef090.css.map
  35. 0 0
      web/static/css/app.26760dd9aed8c9db523523b145fbd101.css
  36. 0 0
      web/static/css/app.26760dd9aed8c9db523523b145fbd101.css.map
  37. 0 0
      web/static/css/app.2c0af923485624503bc22dcd0b4ee174.css
  38. 0 0
      web/static/css/app.2c0af923485624503bc22dcd0b4ee174.css.map
  39. 0 0
      web/static/css/app.3c1c86bccf52e44229ba55063fc1f398.css
  40. 0 0
      web/static/css/app.3c1c86bccf52e44229ba55063fc1f398.css.map
  41. 0 0
      web/static/css/app.42f2a54821afde4a2d4f94b1cece8289.css
  42. 0 0
      web/static/css/app.42f2a54821afde4a2d4f94b1cece8289.css.map
  43. 0 0
      web/static/css/app.52daa5b2abd16ecbad3946232d481028.css
  44. 0 0
      web/static/css/app.52daa5b2abd16ecbad3946232d481028.css.map
  45. 0 0
      web/static/css/app.56c8344526062ce6d3b50be643f16ee8.css
  46. 0 0
      web/static/css/app.56c8344526062ce6d3b50be643f16ee8.css.map
  47. 0 0
      web/static/css/app.7440f7e9d065dea338e93728162ea53c.css
  48. 0 0
      web/static/css/app.7440f7e9d065dea338e93728162ea53c.css.map
  49. 0 0
      web/static/css/app.82ca9ce24f9d256f746c302e48728a40.css
  50. 0 0
      web/static/css/app.82ca9ce24f9d256f746c302e48728a40.css.map
  51. 0 0
      web/static/css/app.8a0fefd4c8e730d799003bccdbb42784.css
  52. 0 0
      web/static/css/app.8a0fefd4c8e730d799003bccdbb42784.css.map
  53. 0 0
      web/static/css/app.8ae19ed4a9be71f67a3fb96828e67840.css
  54. 0 0
      web/static/css/app.8ae19ed4a9be71f67a3fb96828e67840.css.map
  55. 0 0
      web/static/css/app.a6919b7678a23e82f1e389e725630766.css
  56. 0 0
      web/static/css/app.a6919b7678a23e82f1e389e725630766.css.map
  57. 0 0
      web/static/css/app.ab265f03e4ac0f748cc77471c5b40f78.css
  58. 0 0
      web/static/css/app.ab265f03e4ac0f748cc77471c5b40f78.css.map
  59. 0 0
      web/static/css/app.d073cbbb5a63ff4631859c7412269a3f.css
  60. 0 0
      web/static/css/app.d073cbbb5a63ff4631859c7412269a3f.css.map
  61. 0 0
      web/static/css/app.db2e9966fea3478b2bbd6380009000b4.css
  62. 0 0
      web/static/css/app.db2e9966fea3478b2bbd6380009000b4.css.map
  63. 0 0
      web/static/css/app.dc0f1ec05c32fb513c2575275cc3df4c.css
  64. 0 0
      web/static/css/app.dc0f1ec05c32fb513c2575275cc3df4c.css.map
  65. 0 0
      web/static/css/app.e4923a1cd308db187125abded99a8b31.css
  66. 0 0
      web/static/css/app.e4923a1cd308db187125abded99a8b31.css.map
  67. 0 0
      web/static/css/app.f7d8689c06043634c63404be15d158cf.css
  68. 0 0
      web/static/css/app.f7d8689c06043634c63404be15d158cf.css.map
  69. 0 0
      web/static/css/app.fa5b47d7bca4273363b2b524e0e9e420.css
  70. 0 0
      web/static/css/app.fa5b47d7bca4273363b2b524e0e9e420.css.map
  71. BIN
      web/static/fonts/element-icons.535877f.woff
  72. BIN
      web/static/fonts/element-icons.732389d.ttf
  73. 0 0
      web/static/js/0.0ad12877a98c800f60e8.js
  74. 0 0
      web/static/js/0.0ad12877a98c800f60e8.js.map
  75. 0 0
      web/static/js/0.380b056166f3b8007490.js
  76. 0 0
      web/static/js/0.380b056166f3b8007490.js.map
  77. 0 0
      web/static/js/0.60a55fd57a588754d786.js
  78. 0 0
      web/static/js/0.60a55fd57a588754d786.js.map
  79. 0 0
      web/static/js/0.a2fef489c0336b3ba337.js
  80. 0 0
      web/static/js/0.a2fef489c0336b3ba337.js.map
  81. 0 0
      web/static/js/0.b0199c779e87d60b180a.js
  82. 0 0
      web/static/js/0.b0199c779e87d60b180a.js.map
  83. 0 0
      web/static/js/0.c5cce7422d15378ea84a.js
  84. 0 0
      web/static/js/0.c5cce7422d15378ea84a.js.map
  85. 0 0
      web/static/js/0.e9d61018c0041383cdca.js
  86. 0 0
      web/static/js/0.e9d61018c0041383cdca.js.map
  87. 0 0
      web/static/js/0.fd735d1928fc9430cb57.js
  88. 0 0
      web/static/js/0.fd735d1928fc9430cb57.js.map
  89. 0 0
      web/static/js/1.0b7888f1227c78e19780.js
  90. 0 0
      web/static/js/1.0b7888f1227c78e19780.js.map
  91. 0 0
      web/static/js/1.0f17cc88a981dd2db4b4.js
  92. 0 0
      web/static/js/1.0f17cc88a981dd2db4b4.js.map
  93. 0 0
      web/static/js/1.164af5858b78b5497eda.js
  94. 0 0
      web/static/js/1.164af5858b78b5497eda.js.map
  95. 0 0
      web/static/js/1.40cefd191b7fb9291b2e.js
  96. 0 0
      web/static/js/1.40cefd191b7fb9291b2e.js.map
  97. 0 0
      web/static/js/1.46aa50df6c351f94be02.js
  98. 0 0
      web/static/js/1.46aa50df6c351f94be02.js.map
  99. 0 0
      web/static/js/1.50e159eed22009d4b9c7.js
  100. 0 0
      web/static/js/1.50e159eed22009d4b9c7.js.map

+ 545 - 42
Application/Api/Controller/Betorder.php

@@ -6,6 +6,12 @@ use Biz\Money\Money;
 use Biz\Account\AccountManager;
 use App\Api\Model\St_odds_code as odds_codeModel;
 use App\Api\Model\Dc_user_grade;
+
+use Biz\Db\Redis\Cache as Redis;
+use Illuminate\Support\Testing\Fakes\QueueFake;
+// use Illuminate\Contracts\Queue\Queue;
+
+
 /*
  * Class Register
  * @package App\Api\Controller
@@ -23,6 +29,29 @@ class Betorder extends BaseController{
         $this->commonFunction =  C()->get('commonFunction');
 
     }
+
+
+    /**
+     * 测试写队列 任务
+     */
+    public function dd(){
+        //laterOn
+
+        //实例化 队列
+        $Queue = new QueueFake();
+
+        //新建队列 任务
+        $Queue ->push('a','c','123');
+
+        /*
+        $redis = new Redis();
+        $redis->set('name','pengjun');
+
+        $name = $redis->get('name');
+        dd($name);
+        */
+    }
+
     /**
      * 单式串式分类
      * @param  [array] $res 投注数据
@@ -110,9 +139,45 @@ class Betorder extends BaseController{
      * @param  [array] $res 单式投注数据
      * @return  [int] 1 成功 其他失败
      * @param  [int]  $batch_id 批量ID
+     * 弃用
      */
     public function Simplex_bet(array $res,array $userInfo,$batch_id){
 
+        if(empty($res)||empty($userInfo)||empty($batch_id)){
+            Render('', '7003',lang('Errors','Api')->get('error-7003'));
+        }
+        //验证与判断投注了几种
+        foreach($res as $k => $v){
+            $num = $k + 1;
+            if(empty($v['bet_amount'])){
+                $msg = '第'.$num.'条'.lang('Errors','Api')->get('error-5105');
+                Render([], '5105',$msg);
+            }
+            //根据类型分组
+            if(!isset($res[$v['ballId']])){
+                $res[$v['ballId']][] = $v;
+                unset($res[$k]);
+            }else{
+                $res[$v['ballId']][] = $v;
+                unset($res[$k]);
+            }
+
+        }
+        //球类联赛分类并且插入数据库
+        foreach($res as $k => $v){
+            $this->Simplex_bet_insert($v,$userInfo,$k,$batch_id);
+
+            /*
+            $gamedate = $this->Group_ball($res[$k]);
+            $this->Simplex_bet_insert($gamedate,$userInfo,$k,$batch_id);
+            */
+        }
+
+        return $odds_ids;
+    }
+    //弃用 备份
+    public function Simplex_bet___(array $res,array $userInfo,$batch_id){
+
         if(empty($res)||empty($userInfo)||empty($batch_id)){
             Render('', '7003',lang('Errors','Api')->get('error-7003'));
         }
@@ -138,6 +203,8 @@ class Betorder extends BaseController{
             $gamedate = $this->Group_ball($res[$k]);
             $this->Simplex_bet_insert($gamedate,$userInfo,$k,$batch_id);
         }
+
+        return $odds_ids;
     }
 
     /**
@@ -219,9 +286,11 @@ class Betorder extends BaseController{
             $this->M->fanshui($userInfo['account_identity'],$userInfo['account'],$bet_money,$OrderID);//反水
         }
     }
-    public function Simplex_bet_insert($data,$userInfo,$game_code,$batch_id){
+    //按赛事分组 一个赛事一个注单
+    public function Simplex_bet_insert_v1($data,$userInfo,$game_code,$batch_id){
+
         if(empty($data)||empty($userInfo)||empty($game_code)){
-            Render('', '7003',lang('Errors','Api')->get('error-7003'));
+            Render('', '7003',lang('Errors','Api')->get('error-7003'));    
         }
         foreach($data as $k => $v){
             $OrderID = OrderID('S');//生成订单ID
@@ -301,7 +370,7 @@ class Betorder extends BaseController{
                 $order['single_result'] = json_encode($json_single_result);
             }
             //如果是滚球投注,追加字段
-            if($is_rolling == 1){
+            if($is_rolling == 1 and $game_code == 'zq'){
                 $order['roll_ratify'] = 2;//未审核滚球投注
             }
             $insert = lm("MoneyBuySimplex",'Api')->insert($order);
@@ -316,8 +385,179 @@ class Betorder extends BaseController{
             $this->M->fanshui($userInfo['account_identity'],$userInfo['account'],$bet_money,$OrderID);//反水
         }
     }
+    //无需按赛事分组
+    public function Simplex_bet_insert($data,$userInfo,$game_code,$batch_id){
+
+        if(empty($data)||empty($userInfo)||empty($game_code)){
+            Render('', '7003',lang('Errors','Api')->get('error-7003'));    
+        }
+        foreach($data as $k => $v){
+            $OrderID = OrderID('S');//生成订单ID
+            $UUID = UUID(); //生成信息ID
+            $bet_money = 0; //赛事总投注额
+            $prize_money = 0; //可赢额
+            //====处理 投注数据
+            //是否是冠军投注,如果==0 则为冠军投注
+             $is_champion = 0;
+             if($v['match_id'] == 0){
+                 $is_champion = 1;
+             }
+             //获取联赛id lg_id
+             $lg_id = $v['lg_id'];
+             $bet_money = $v['bet_amount'];
+             //计算每个投注玩法下的可赢金额
+             $prize_money =  $v['odds']* $v['bet_amount'];
+             //是否是滚球投注
+             $is_rolling = 0;
+             //追加滚球投注时 赛事进行时间
+             $roll_time = 0;
+             //主队得分
+             $home_score = 0;
+             //客队得分
+             $guest_score = 0;
+             if($v['oddsType']=='StRollBall'){
+                $is_rolling = 1;
+                $roll_time=$v['roll_time']?:'';
+                $home_score = $v['home_score']?:0;
+                $guest_score = $v['guest_score']?:0;
+             }
+             //===追加各球类其他状态码===
+             //即将
+            if($v['oddsType']=='StSoon'){
+                $is_rolling = 2;
+            }
+             //今日
+             if($v['oddsType']=='StToday'){
+                $is_rolling = 3;
+            }
+             //早盘
+             if($v['oddsType']=='StMorningPlate'){
+                $is_rolling = 4;
+            }
+             //串场
+             if($v['oddsType']=='StStringScene'){
+                $is_rolling = 5;
+            }
+             //冠军
+             if($v['oddsType']=='StChampion'){
+                $is_rolling = 6;
+            }
+            //首页
+            if($v['oddsType']=='home'){
+                $is_rolling = 7;
+            }
+
+             //===end===
+             $matchData =[
+                 'odds_id' =>$v['id'],
+                 'home_team' => $v['home_team'],
+                 'guest_team' => $v['guest_team'],
+                 'condition' => $v['condition'],
+                 'odds' => $v['odds'],
+                 'odds_code' => $v['odds_code'],
+                 'p_code' => $v['p_code'],
+                 'odds_only' => $v['odds_only'],
+                 'match_id' => $v['match_id'],
+                 'game_code' => $game_code,
+                 'lg_id' => $lg_id,
+                 'batch_id' => $batch_id,
+                 'bet_type' => 1,
+                 'bet_money' => $bet_money,
+                 'ctime' => $this->time,
+                 'utime' => $this->time,
+                 'is_rolling' =>$is_rolling,
+                 'is_champion' => $is_champion?:0,//1 冠军投注 0普通赛事投注
+                 'order_id'=>$OrderID,//追加所属订单id
+                 'roll_time'=>$roll_time,//追加滚球投注时 赛事进行时间
+                 'home_score'=>$home_score,//主队得分
+                 'guest_score'=>$guest_score,//客队得分
+             ];
+
+              //插入数据源
+             $moneyBuyMatch = lm('MoneyBuyMatch','Api')->insert($matchData);
+             if(!$moneyBuyMatch){
+                 Render('','3205',lang('errors','Api')->get('error-3205'));
+             }
+             //===end===
+            $order = [];
+            $order =[
+                'info_identity' => $UUID,
+                'account_name' => $userInfo['account'],
+                'account_identity' => $userInfo['account_identity'],
+                'order_id' => $OrderID,//$OrderID,
+                'game_code' => $game_code,
+                'batch_id' => $batch_id,
+                'match_id' => $v['match_id'],
+                'lg_id' => $lg_id,
+                'game_no'  => "",
+                'prize_money'=> $prize_money,
+                'money' => $bet_money, //投注金额
+                '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);
+            }
+            //如果是滚球投注,追加字段
+            if($is_rolling == 1 and $game_code == 'zq'){
+                $order['roll_ratify'] = 2;//未审核滚球投注
+            }
+            $insert = lm("MoneyBuySimplex",'Api')->insert($order);
+            if(!$insert){
+                Render('','3205',lang('errors','Api')->get('error-3205'));
+            }
+            $insertMoney  = $this->M->insertMoney($userInfo['account_identity'],$bet_money,$OrderID,1,"",$UUID,$userInfo);
+            
+            if($insertMoney!=1){
+                Render('', $insertMoney,lang('Errors','Api')->get('error'.$insertMoney));
+            }
+            $this->M->fanshui($userInfo['account_identity'],$userInfo['account'],$bet_money,$OrderID);//反水
+
+            //===追加写处理队列===
+            //订单号   比赛id188  开赛日期时间  比赛状态(早盘,今日,串场,滚球), 父级玩法, 子级玩法,排序
+            //获取开赛时间
+            //根据球类代码 获取相关model
+            $models = $this->commonFunction->getModels($v['ballId']);
+            $model_match = $models['model_match'];
+            $info = lm($model_match,'Sports')
+                ->select('match_date','match_time','match_identity')
+                ->where('id',$v['match_id'])
+                ->first();
+
+            $match_time = $info->match_date.' '.$info->match_time;
+
+            $orderData = [
+                'order_type'=>1,//订单类型 1单式 2串式
+                'order_id'=>$OrderID,//订单ID
+                'bet_money'=>$bet_money,//投注金额
+                'matchData'=>[
+                    [
+                        'game_code'=>$v['ballId'],//球类代码
+                        'other_match_id'=>$v['others_match_id'],//第三方赛事id 188
+                        'match_id'=>$v['match_id'],//本地赛事id
+                        'match_uuid'=> $info->match_identity,//赛事uuid
+                        'odds_code'=>$v['odds_code'],//子玩法代码
+                        'p_code'=>$v['p_code'],//父玩法代码
+                        'match_time'=>$match_time,//开赛时间
+                        'match_type'=>$is_rolling,//比赛盘口
+                        'sort'=>$v['sort'],//排序
+                    ]
+                ],
+            ];
+            $this->commonFunction->setOrderQueue($orderData);
+        }
+    }
 
     public function Bet(){
+     
         /*
         // 模拟单式数据
         $get_data = [
@@ -325,64 +565,64 @@ class Betorder extends BaseController{
                 [
                     'type'=>1,
                     'index'=>0,
-                    'bet_amount'=>1,
+                    'bet_amount'=>100,
                 ],
                 [
                     'type'=>1,
                     'index'=>1,
-                    'bet_amount'=>1,
+                    'bet_amount'=>100,
                 ],
                 [
                     [
-                        'id'=>226063,
-                        'home_team'=>'内蒙古草上飞',
-                        'guest_team'=>'吉林百嘉',
-                        'name'=>'内蒙古草上飞',
-                        'odds'=>0.81,
-                        'match_id'=>0,
-                        'condition'=>'0.5/1',
+                        'id'=>10350565,
+                        'home_team'=>'什鲁斯伯里',
+                        'guest_team'=>'彼德堡',
+                        'name'=>'',
+                        'odds'=>1.09,
+                        'match_id'=>1463,
+                        'condition'=>'2.5/3',
                         'ballId'=>'zq',
-                        'odds_code'=>'concede_home',
-                        'p_code'=>'concede',
-                        'play_name'=>'让球',
+                        'odds_code'=>'gsb',
+                        'p_code'=>'GS',
+                        'play_name'=>'进球大小',
                         'score'=>0,
                         'bettingTime'=>date('Y-m-d H:i:s',time()),
-                        'odds_only'=>'272af2647b112b7eb337a2ed16753c6f',
-                        'lg_id'=>29,
-                        'repeat'=>'false',
-                        'match_type'=>'StRollBall',//滚球投注
-                        // 'is_champion'=>1,//是否是冠军联赛
+                        'odds_only'=>'6a003dec710a42849a82dd1ea978f572',
+                        'lg_id'=>17,
+                        'match_type'=>'',//滚球投注
+                        'odds_id'=>10350565,
+                        'repeat'=>'true',
+                        'is_champion'=>0,//是否是冠军联赛
                     ],
                     [
-                        'id'=>2260632,
-                        'home_team'=>'内蒙古草上飞1',
-                        'guest_team'=>'吉林百嘉2',
-                        'name'=>'内蒙古草上飞',
-                        'odds'=>0.81,
-                        'match_id'=>1249,
-                        'condition'=>'0.5/1',
+                        'id'=>10781633,
+                        'home_team'=>'什鲁斯伯里',
+                        'guest_team'=>'彼德堡',
+                        'name'=>'彼德堡',
+                        'odds'=>1,
+                        'match_id'=>1463,
+                        'condition'=>'-0/0.5',
                         'ballId'=>'zq',
-                        'odds_code'=>'concede_home',
-                        'p_code'=>'concede',
+                        'odds_code'=>'cog',
+                        'p_code'=>'CO',
                         'play_name'=>'让球',
                         'score'=>0,
                         'bettingTime'=>date('Y-m-d H:i:s',time()),
-                        'odds_only'=>'272af2647b112b7eb337a2ed16753c6f1',
-                        'lg_id'=>29,
-                        'repeat'=>'false',                       
-                        'match_type'=>'StRollBall',//滚球投注
+                        'odds_only'=>'390e2b68992587438c0020179abc94f5',
+                        'lg_id'=>17,
+                        'match_type'=>'',//滚球投注
+                        'odds_id'=>10781633,
+                        'repeat'=>'true',
                         'is_champion'=>0,//是否是冠军联赛
-                    ],
+                    ]
                 ]
             ],
             
-            'token'=>'ppWGRW15682541865d79a8eacb0b1',
-            'bet_money'=>900,
-            'bet_money_arr'=>[100,200,300],
-
+            'token'=>'Zj2aXC15738846155dcf92c78385c',
+            'bet_money'=>200,
         ];
-
         */
+
         /*
         //  模拟串式数据
          $get_data = [
@@ -476,7 +716,7 @@ class Betorder extends BaseController{
             $bet_money = $_REQUEST['bet_money'];
             $token = $_REQUEST['token'];
             // $bet_money_arr = $_REQUEST['bet_money_arr'];
-        }   
+        } 
 
         /*
         $data = $get_data['data'];
@@ -519,7 +759,7 @@ class Betorder extends BaseController{
             _rollBack();//回滚
             print $e->getMessage();
         }
-}
+    }
 
     /**
      * token获取用户详情
@@ -663,7 +903,7 @@ class Betorder extends BaseController{
      * $userInfo 用户数据
      * $batch_id 批次号
      */
-    public function stringBet($data_str=[],$data_all=[],$userInfo=[],$batch_id=0){
+    public function stringBet__($data_str=[],$data_all=[],$userInfo=[],$batch_id=0){
         //验证串式投注是否合法
         $this->verify_stringType($data_all);
         //获取串式 总赛事数量
@@ -764,6 +1004,152 @@ class Betorder extends BaseController{
 
         return true;
     }
+    public function stringBet($data_str=[],$data_all=[],$userInfo=[],$batch_id=0){
+        //验证串式投注是否合法
+        $this->verify_stringType($data_all);
+        //获取串式 总赛事数量
+        $groupNum = count($data_all);//总数量
+
+        $orderData = [];
+        foreach ($data_str as $k=>$v){
+            //字符串替换
+            $str = str_ireplace("串","_",$v['type']);
+            //获取type 3_12
+            $after = substr($str,strpos($str,"_")+1);
+            //当前串式 值
+            $sonNum = substr($str,0,strrpos($str,"_"));
+            //获取倍数
+            if((int)$after == 1){
+                $multiple = $this->getMultiple($groupNum,(int)$sonNum);
+            }else{
+                $multiple =(int)$after;
+            }
+
+            //获取当前串式投注金额及可赢金额
+            if($after == 1){
+                $money_all = $this->getmakeMoney((int)$sonNum,$v['bet_amount'],$multiple,$data_all,$after);
+            }else{
+                $money_all = $this->getStrAllMoney((int)$sonNum,$v['bet_amount'],$multiple,$data_all,$after);
+            }
+            //投注金额
+            $moneyData = $money_all['moneyData'];
+            //可赢金额
+            $prize_money = $money_all['prize_money'];
+            $uuid = UUID();
+            $orderID = OrderID('T');
+
+            $orderData[$k]['info_identity'] = $uuid;
+            $orderData[$k]['account_name'] = $userInfo['account'];
+            $orderData[$k]['account_identity'] = $userInfo['account_identity'];
+            $orderData[$k]['order_id'] = $orderID;
+            $orderData[$k]['game_no'] = "";
+            $orderData[$k]['money'] = $moneyData;//$pay_money//总投注金额
+            $orderData[$k]['money_time'] = $this->time;//下注时间
+            $orderData[$k]['prize_money'] = $prize_money;//$expect_money ;//预期总可赢金额
+            $orderData[$k]['str_type'] = $v['type'];//串式类型
+            $orderData[$k]['batch_id'] = $batch_id;//批次号
+            $orderData[$k]['wait_match_num'] = count($data_all);//批次号
+
+            //写资金变动表
+            $insertMoney  = $this->M->insertMoney($userInfo['account_identity'],$moneyData,$orderID,1,"",$uuid,$userInfo);
+            if($insertMoney!=1){
+                Render('', $insertMoney,lang('Errors','Api')->get('error'.$insertMoney));
+            }
+            $this->M->fanshui($userInfo['account_identity'],$userInfo['account'],$moneyData,$orderID);//反水
+
+            //===处理赛事数据===
+            foreach ($data_all as $kk=>$vv){
+                $getModels = $this->commonFunction->getModels($vv['ballId']);
+                $model_match = $getModels['model_match'];
+    
+                //获取是否是滚球投注
+                $is_rolling = 0;
+    
+                if($vv['match_type'] == 'StRollBall'){
+                    $is_rolling = 1;
+                }
+                $matchData[] = [
+                    'batch_id'=>$batch_id,
+                    'odds_id'=>$vv['id'],
+                    'home_team'=>$vv['home_team'],
+                    'guest_team'=>$vv['guest_team'],
+                    'condition'=>$vv['condition'],
+                    'odds'=>$vv['odds'],
+                    'odds_code'=>$vv['odds_code'],
+                    'p_code'=>$vv['p_code'],
+                    'odds_only'=>$vv['odds_only'],
+                    'status'=>0,
+                    'match_id'=>$vv['match_id'],
+                    'game_code'=>$vv['ballId'],
+                    'lg_id'=> $vv['lg_id'],
+                    'ctime'=>$this->time,//写入时间
+                    'utime' => $this->time,
+                    'bet_type'=>2,
+                    'is_rolling'=>$is_rolling,
+                    'order_id'=> $orderID,
+                ];
+
+                //=====拼接赛事数据===
+                 //获取开赛时间
+                //根据球类代码 获取相关model
+                $models = $this->commonFunction->getModels($vv['ballId']);
+                $model_match = $models['model_match'];
+                $info = lm($model_match,'Sports')
+                    ->select('match_date','match_time','match_identity')
+                    ->where('id',$vv['match_id'])
+                    ->first();
+
+                $match_time = $info->match_date.' '.$info->match_time;
+                $match_data_order[] = [
+                    'game_code'=>$vv['ballId'],//球类代码
+                    'other_match_id'=>$vv['others_match_id'],//第三方赛事id 188
+                    'match_id'=>$vv['match_id'],//本地赛事id
+                    'match_uuid'=> $info->match_identity,//赛事uuid
+                    'odds_code'=>$vv['odds_code'],//子玩法代码
+                    'p_code'=>$vv['p_code'],//父玩法代码
+                    'match_time'=>$match_time,//开赛时间
+                    'match_type'=>$is_rolling,//比赛盘口
+                    'sort'=>$vv['sort'],//排序
+                ];
+                //===end===
+            }
+
+            //===追加写处理队列===
+            //订单号   比赛id188  开赛日期时间  比赛状态(早盘,今日,串场,滚球), 父级玩法, 子级玩法,排序
+            //赛事去重
+            $match_data_order = $this->commonFunction->array_unset_tt($match_data_order,'match_id');
+            sort($match_data_order);
+            
+            $orderData_queue[] = [
+                'order_type'=>2,//订单类型 1单式 2串式
+                'order_id'=>$orderID,//订单ID
+                'bet_money' =>$moneyData,//投注金额
+                'matchData'=>$match_data_order
+            ];
+        }
+
+         //写赔率数据表
+         $moneyBuyMatch = lm('MoneyBuyMatch','Api')->insert($matchData);
+         if(!$moneyBuyMatch){
+             Render('','3205',lang('errors','Api')->get('error-3205'));
+         }
+
+         //===end===
+
+        //写注单 表
+        $moneyBuy = lm('MoneyBuyStr','Api')->insert($orderData);
+
+        if(!$moneyBuy){
+            Render('','3205',lang('errors','Api')->get('error-3205'));
+        }
+
+        //写队列
+        foreach($orderData_queue as $k=>$v){
+            $this->commonFunction->setOrderQueue($v);            
+        }
+
+        return true;
+    }
 
     /**
      * 计算串式投注 倍率
@@ -942,5 +1328,122 @@ class Betorder extends BaseController{
         ];
         Render($data, '1', lang('Tips','Sports')->get('success'));
     }
+
+    /**
+     * 用户撤单操作 接口
+     * 单订单操作
+     */
+    public function reOrder(){
+        //获取球类代码
+        $order_id = $_REQUEST['order_id'];
+        $token = $_REQUEST['token'];
+        
+        try {
+            
+            if(empty($order_id)){
+                throw new \Exception(Render([], '10001', lang('Tips','Sports')->get('PARAM_ERROR')));
+            }
+           
+            _beginTransaction();//开启事务
+            // 单式 S  串式 T
+            if(substr($order_id,0,1) == 'S'){
+                //单式订单 model
+                $order_model = 'money_buy_simplex';     
+            }else{
+                //串式订单 model
+                $order_model = 'money_buy_str';
+            }
+
+            //查询订单信息
+            $order_data = lm($order_model,"Commons")
+                ->where('order_id',$order_id)
+                ->first();
+
+            //订单不存在
+            if(empty($order_data)) throw new \Exception(Render([], '10030', lang('Tips','Sports')->get('order_null')));
+
+            //订单非投注状态 不可撤单
+            if($order_data->status != 1) throw new \Exception(Render([], '10031', lang('Tips','Sports')->get('order_type_err')));
+             //获取用户数据
+             $userInfo = $this->getAgent($token);
+
+            //验证订单是否属于该用户
+            if($order_data->account_identity != $userInfo['account_identity']) throw new \Exception(Render([], '10025', lang('Tips','Sports')->get('auth_error').':不是该用户的订单'));
+
+             //获取用户账户余额
+             $cash = $userInfo['cash'];
+             //获取订单涉及金额
+             $where = [
+                 ['trade_id','=',$order_id],
+                 ['status','=',1]
+             ];
+             $odds_money_data = lm('money_details',"Commons")
+                 ->select('info_identity','trade_id','account_name','account_identity','money','money_type','money_cash','trade_type','status')
+                 ->where($where)
+                 ->get();
+             
+             if(empty($odds_money_data))  throw new \Exception(Render([], '10026', lang('Tips','Sports')->get('order_money_err')));
+             $odds_money_data = $odds_money_data -> toArray();
+             //获取订单投注金额
+             $odds_money_bet = 0;
+             //获取订单反水金额
+             $odds_money_fs = 0;
+ 
+             foreach($odds_money_data as $k=>$v){
+                 if($v['trade_type'] == 1){
+                     $odds_money_bet = $v['money'];
+                 }
+                 if($v['trade_type'] == 7){
+                     $odds_money_fs = $v['money'];
+                 }
+             }
+
+            //更新订单状态为已取消
+            $up_order = lm($order_model,"Commons")
+                ->where('order_id',$order_id)
+                ->update(['status'=>3,'use_mark'=>'用户撤单']);
+            
+            if($up_order < 1) throw new \Exception(Render([], '10027', lang('Tips','Sports')->get('order_status_up_err')));
+
+            //===退款===
+            //需退回金额 = 投注金额-反水金额
+            $money = abs($odds_money_bet - $odds_money_fs);
+            //用户剩余金额
+            $new_available_cash = $cash + $money;
+
+            //组装新增数据
+            $set_money_data = [
+                'info_identity' => UUID(),
+                'trade_id' => $order_id,
+                'account_name' => $userInfo['account'],
+                'account_identity' => $userInfo['account_identity'],
+                'money' => $money,
+                'money_time' => date("Y-m-d H:i:s", time()),
+                'money_type' => 1,
+                'money_cash' => $new_available_cash,
+                'trade_type' => 3,
+                'trade_desc' => '用户撤单,退回投注资金:¥'.$money.';订单号:'.$order_id.'',
+                'status' => 1,
+            ];
+
+
+            //更新用户数据
+            $ret_user = lm('account_detailed',"Commons")
+                ->where('account_identity', $v['account_identity'])
+                ->update(['available_cash' => $new_available_cash, 'cash' => $new_available_cash]);
+
+            if($ret_user < 1)  throw new \Exception(Render([], '10028', lang('Tips','Sports')->get('up_user_err')));
+
+            //更新用户资金数据
+            $set_money  =  lm('money_details',"Commons")->insert($set_money_data);
+            if($set_money != true) throw new \Exception(Render([], '10029', lang('Tips','Sports')->get('add_money_err')));
+
+            //===end===
+            _commit();//提交
+            Render('', '1', lang('Tips','Sports')->get('success'));
+        } catch (\Exception $e) {
+            echo $e->getMessage();
+        }
+    }
 }
 

+ 1 - 1
Application/Api/Controller/UserBuy.php

@@ -36,7 +36,7 @@ class UserBuy extends BaseController {
         $msg = lang('Common','Api') -> get('error');
         try{
             $moneyBuyClass = new MoneyBuy();
-            // 获取下注信息
+            // 获取下注信息 1单式 2串式
             if ($_POST['type'] == 2) {
                 $result = $moneyBuyClass -> stringBetRecord();
             } else {

+ 168 - 33
Application/Api/Model/MoneyBuy.php

@@ -75,17 +75,72 @@ class MoneyBuy extends Model {
         if (empty($userInfo['identity'])) {
             Render([], '2001', lang('Common','Api') -> get('user does login'));
         }
+         
+        //===追加结算状态===
+        //拼接条件
+        $moneyBuySpxWhere = [];
+         // 用户ID
+         $moneyBuySpxWhere[] = ['account_identity','=',$userInfo['identity']];
+         // 输赢
+         if (!empty($_POST['result'])) {
+            $moneyBuySpxWhere[] = ['game_status','=',$_POST['result']];
+         }
+         // 结算状态 默认0 所有 1未结算 2已结算 -1无效
+        $set_status = $_POST['set_status']?:0;
+        if($set_status == 1){//未结算注单
+            $moneyBuySpxWhere[] = ['status','=',1];
+            $moneyBuySpxWhere[] = ['settle_status','=',1];
+            $moneyBuySpxWhere[] = ['roll_ratify','>',-1];
+            $moneyBuySpxWhere[] = ['roll_ratify','<',2];
+        }
+        if($set_status == 2){//已结算注单
+            $moneyBuySpxWhere[] = ['status','=',1];
+            $moneyBuySpxWhere[] = ['settle_status','>',1];
+            $moneyBuySpxWhere[] = ['roll_ratify','>',-1];
+            $moneyBuySpxWhere[] = ['roll_ratify','<',2];
+        }
+        if($set_status == -1){//无效注单
+            $moneyBuySpxWhere[] = ['status','>',1];
+            // $moneyBuySpxWhere[] = ['roll_ratify','=',-1];
+        }
+        //追加按球类查询订单
+        if($_POST['game_code'] != ''){
+            $moneyBuySpxWhere[] = ['game_code','=',$_POST['game_code']];
+        }
+        //按订单查询
+        if($_POST['order_id'] != ''){
+            $moneyBuySpxWhere[] = ['order_id','=',$_POST['order_id']];
+        }
+        //按赛事查询
+        if($_POST['match_id'] != ''){
+            $moneyBuySpxWhere[] = ['match_id','=',$_POST['match_id']];
+        }
+        //按玩法查询
+        // if($_POST['p_code'] != ''){
+        //     $moneyBuySpxWhere[] = ['p_code','=',$_POST['p_code']];
+        // }
+
+        //===end===
         
         // 用户ID
-        $moneyBuySpxWhere['account_identity'] = $userInfo['identity'];
+        // $moneyBuySpxWhere['account_identity'] = $userInfo['identity'];
         // 时间区间
         $startTime = isset($_POST['startTime'])? $_POST['startTime'] : '1900-01-01 00:00:00';
         $endTime = isset($_POST['endTime'])? $_POST['endTime'] : '3000-12-12 00:00:00';
         $moneyBuySpxBetween = ['money_time' => [$startTime, $endTime]];
         $moneyBuySpxMdl = lm('money_buy_simplex', "commons");
+
+        //===追加状态字段 Tank.peng 2019/10/22===
+        /*
+        状态:1 投注 2作废 3撤单
+        */
+        // $status = $_POST['status']?$_POST['status']:1;
+        // $moneyBuySpxWhere['status'] = $status;
+
+        //===end===
         
         // 获取订单记录
-        $moneyBuySpxSlt = ['batch_id', 'order_id'];
+        $moneyBuySpxSlt = ['batch_id', 'order_id','use_mark','status as order_status','settle_status','roll_ratify'];
         $getMoneyBuySpx = $moneyBuySpxMdl -> moneyBuySimplex($moneyBuySpxSlt, $moneyBuySpxWhere, $moneyBuySpxBetween, '', '', 1);
         // 获取全部订单id
         $moneyBuyMthOr = [];
@@ -100,10 +155,9 @@ class MoneyBuy extends Model {
 
             return $result;
         }
-        
         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;
         // 输赢
@@ -133,7 +187,7 @@ class MoneyBuy extends Model {
         
         // 获取注单
         $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','is_rolling','roll_time','home_score','guest_score', 'result', 'home_team',  'batch_id','order_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);
         
@@ -168,8 +222,18 @@ class MoneyBuy extends Model {
                 }
             }
             foreach ($getMoneyBuySpx as $key => $value) {
-                if ($v->batch_id == $value['batch_id']) {
-                    $getMoneyBuyMth[$k]->order_id = $value['order_id'];
+                if ($v->order_id == $value['order_id']) {
+                    $getMoneyBuyMth[$k]->order_id = $value['order_id'];//订单id
+                    $getMoneyBuyMth[$k]->order_status = $value['order_status'];//订单状态
+                    $getMoneyBuyMth[$k]->roll_ratify = $value['roll_ratify'];//滚球投注审核状态
+                    $getMoneyBuyMth[$k]->use_mark = $value['use_mark'];//处理备注
+                    if($value['settle_status'] > 1 and $value['order_status'] == 1){
+                        $getMoneyBuyMth[$k]->settle_status = 2;//结算状态 已结算
+                    }else if($value['settle_status'] == 1  and $value['order_status'] == 1){
+                        $getMoneyBuyMth[$k]->settle_status = 1;//结算状态 未结算                       
+                    }else if($value['order_status'] > 1){
+                        $getMoneyBuyMth[$k]->settle_status = -1;//结算状态 无效                  
+                    }
                 }
             }
         }
@@ -202,7 +266,7 @@ class MoneyBuy extends Model {
         // 循环添加玩法和判断玩法是否可加注
         foreach ($getMoneyBuyMth as $key => $value) {
             $getMoneyBuyMth[$key]->willMoney = $value->bet_money * $value->odds;
-            if ($value->result) {
+            if ($value->result and $value->order_status < 2 and $value->settle_status >1) {
                 switch (intval($value->result)) {
                     case 1:
                         $oddsDiscount = 1 + $value->odds;
@@ -259,28 +323,70 @@ class MoneyBuy extends Model {
         if (empty($userInfo['identity'])) {
             Render([], '2001', lang('Common','Api') -> get('user does login'));
         }
+
+        //===追加结算状态===
+        //拼接条件
+        $moneyBuyStrWhere = [];
+         // 用户ID
+         $moneyBuyStrWhere[] = ['account_identity','=',$userInfo['identity']];
+         // 输赢
+         if (!empty($_POST['result'])) {
+            $moneyBuyStrWhere[] = ['game_status','=',$_POST['result']];
+         }
+         // 结算状态 默认0 所有 1未结算 2已结算 -1无效
+        $set_status = $_POST['set_status']?:0;
+        if($set_status == 1){//未结算注单
+            $moneyBuyStrWhere[] = ['settle_status','=',1];
+        }
+        if($set_status == 2){//已结算注单
+            $moneyBuyStrWhere[] = ['settle_status','>',1];
+        }
+        if($set_status == -1){//无效注单
+            $moneyBuyStrWhere[] = ['status','>',1];
+        }
+        /*
+        //追加按球类查询订单
+        if($_POST['game_code'] != ''){
+            $moneyBuyStrWhere[] = ['game_code','=',$_POST['game_code']];
+        }
+        //按赛事查询
+        if($_POST['match_id'] != ''){
+            $moneyBuyStrWhere[] = ['match_id','=',$_POST['match_id']];
+        }
+        */
+        //按订单查询
+        if($_POST['order_id'] != ''){
+            $moneyBuyStrWhere[] = ['order_id','=',$_POST['order_id']];
+        }
+        
+        //===end===
+
         // 用户ID
-        $moneyBuyStrWhere['account_identity'] = $userInfo['identity'];
+        // $moneyBuyStrWhere['account_identity'] = $userInfo['identity'];
         // 输赢
-        if (!empty($_POST['result'])) {
-            $moneyBuyStrWhere['game_status'] = $_POST['result'];
-        }
+        // if (!empty($_POST['result'])) {
+        //     $moneyBuyStrWhere['game_status'] = $_POST['result'];
+        // }
         // 时间区间
         $startTime = isset($_POST['startTime'])? $_POST['startTime'] : '1900-01-01 00:00:00';
         $endTime = isset($_POST['endTime'])? $_POST['endTime'] : '3000-12-12 00:00:00';
+
         $moneyBuyStrBetween = ['money_time' => [$startTime, $endTime]];
         $moneyBuyStrMdl = lm('money_buy_str', "commons");
         // 当前页
         $currentPage = isset($_POST['currentPage']) ? $_POST['currentPage'] : "1";
         // 分页大小
-        $pageSize = isset($_POST['pageSize']) ? $_POST['pageSize'] : "10";
+        $pageSize = isset($_POST['pageSize']) ? $_POST['pageSize'] : '10';
+
         // 起始查询位置
         $begin = ($currentPage - 1) * $pageSize;
         // 获取订单记录
-        $moneyBuyStrSlt = ['order_id', 'batch_id', 'gain_money', 'game_status', 'money', 'prize_money', 'money_time'];
+        $moneyBuyStrSlt = ['order_id', 'batch_id', 'gain_money','status as order_status','settle_status','game_status', 'money', 'prize_money', 'money_time'];
         $getMoneyBuyStr = $moneyBuyStrMdl -> moneyBuyStr($moneyBuyStrSlt, $moneyBuyStrWhere, $moneyBuyStrBetween, $begin, $pageSize, 1);
+
         $allCount = $moneyBuyStrMdl -> moneyBuyStrTotal($moneyBuyStrWhere, $moneyBuyStrBetween);
         // 获取全部订单id
+        $order_ids = array_column($getMoneyBuyStr,'order_id');
         $moneyBuyMthOr = [];
         $allBatchId = array_unique($getMoneyBuyStr, SORT_REGULAR);
         if (!$allBatchId) {
@@ -297,11 +403,16 @@ class MoneyBuy extends Model {
             $moneyBuyMthOr[0][$key][0] = 'batch_id';
             $moneyBuyMthOr[0][$key][1] = $value['batch_id'];
         }
-        $moneyBuyMthWhere['bet_type'] = 2;
+        // foreach ($allBatchId as $key => $value) {
+        //     $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'];
-        $getMoneyBuyMth = $moneyBuyMthMdl -> moneyBuyMatch($moneyBuyMthSlt, $moneyBuyMthWhere, $moneyBuyMthOr, $begin, $pageSize);
+        $moneyBuyMthSlt = ['status', 'matchresult','is_rolling','roll_time','home_score','guest_score', '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='','',$order_ids);
         // 获取所有的比赛类型
         $stGameTypeMdl = lm('StGameType', "commons");
         $StGameTypeSlt = ['game_code'];
@@ -317,12 +428,14 @@ class MoneyBuy extends Model {
         foreach ($getMoneyBuyMth as $value) {
             $allMatch[$value->game_code][] = $value->match_id;
         }
+
         $stCompetitionMdl = lm('St_competition', "commons");
         // 循环获取所有的赛事信息
         foreach ($allMatch as $key => $value) {
             $stCptWhrOr = array_unique($value);
             $allMatchInfo[$key] = $stCompetitionMdl -> getMatch($key, $stCptWhrOr);
         }
+
         // 循环添加赛事时间
         foreach ($getMoneyBuyMth as $k => $v) {
             foreach ($allMatchInfo[$v->game_code] as $key => $value) {
@@ -345,9 +458,11 @@ class MoneyBuy extends Model {
                 'odds_code' => $odds_code,
             ];
             // 判断是否重复
-            if (!$commonFunction -> judgeEqual($where, $stOddsWheres[$gameType])) {
-                $stOddsWheres[$gameType][] = $where;
-            }
+            // if (!$commonFunction -> judgeEqual($where, $stOddsWheres[$gameType])) {
+            //     $stOddsWheres[$gameType][] = $where;
+            // }
+            $stOddsWheres[$gameType][] = $where;
+
         }
         // 查询数据下所有可加注的游戏
         $stOddsModel = lm('stOdds','commons');
@@ -359,6 +474,7 @@ class MoneyBuy extends Model {
                 $getSstOdds[$key] = $stOddsModel -> stOdds($stOddsSelect, $value, $key);
             }
         }
+
         // 循环添加玩法和判断玩法是否可加注
         foreach ($getMoneyBuyMth as $key => $value) {
             $typeSstOdds = $getSstOdds[$value -> game_code];
@@ -381,16 +497,25 @@ 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;
                 }
             }
+            $getMoneyBuyStr[$key]->use_mark = $value['use_mark'];//处理备注
+            if($value['settle_status'] > 1 and $value['order_status'] == 1){
+                $getMoneyBuyStr[$key]->settle_status = 2;//结算状态 已结算
+            }else if($value['settle_status'] == 1  and $value['order_status'] == 1){
+                $getMoneyBuyStr[$key]->settle_status = 1;//结算状态 未结算                       
+            }else if($value['order_status'] > 1){
+                $getMoneyBuyStr[$key]->settle_status = -1;//结算状态 无效                  
+            }
         }
+
         // 获取记录总数
         $result['total'] = $allCount;
         $result['list'] = $getMoneyBuyStr;
         // 总页数计算
-        $result['countPage'] = ceil($result['total'] / $pageSize);
+        $result['countPage'] = ceil($result['total'] / 10);
         $result['currentPage'] = $currentPage;
 
         return $result;
@@ -425,7 +550,7 @@ class MoneyBuy extends Model {
         // 当前页
         $currentPage = isset($_POST['currentPage']) ? $_POST['currentPage'] : "1";
         // 分页大小
-        $pageSize = isset($_POST['pageSize']) ? $_POST['pageSize'] : "10";
+        $pageSize = isset($_POST['pageSize']) ? $_POST['pageSize'] : 10;
         // 起始查询位置
         $begin = ($currentPage - 1) * $pageSize;
         $moneyRecord = lm('Money_buy_simplex', "commons");
@@ -455,31 +580,40 @@ class MoneyBuy extends Model {
             Render([], '2001', lang('Common','Api') -> get('user does login'));
         }
         // 用户ID
-        $moneyBuyWhere['account_identity'] = $userInfo['identity'];
+        // $moneyBuyWhere['account_identity'] = $userInfo['identity'];
         // 时间区间
+
         $endTime = date('Y-m-d H:i:s');
         if ($userInfo['statisticsTime']) {
             $startTime = $userInfo['statisticsTime'];
         } else {
             $startTime = '1900-01-01 00:00:00';
         }
-        $moneyBuyBetween = [$startTime, $endTime];
+        
+        // $moneyBuyBetween = [$startTime, $endTime];
         $moneyRecordWhere['settle_status'] = 2;
+        $moneyBuyWhere = [
+            ['account_identity','=',$userInfo['identity']],
+            ['money_time','>',$startTime],
+            ['money_time','<',$endTime],
+        ];
+
         // 获取单式投注订单
         $moneyBuySimplex = lm('money_buy_simplex', "commons");
         $mnyBuySpxData = $moneyBuySimplex
             ->select(['order_id', 'money', 'gain_money', 'batch_id'])
             ->where($moneyBuyWhere)
-            ->whereBetween('settlementTime', $moneyBuyBetween)
+            // ->whereBetween('settlementTime', $moneyBuyBetween)
             ->get()
             ->toArray();
+
         // 获取全部订单id
         $moneyBuyMthOr = [];
         $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;
             // 获取注单
@@ -489,16 +623,16 @@ class MoneyBuy extends Model {
         } else {
             $getMoneyBuyMth = [];
         }
-
         // 获取串式投注订单
         $moneyBuyStr = lm('money_buy_str', "commons");
         $mnyBuyStrData = $moneyBuyStr
             ->select(['order_id', 'money', 'gain_money'])
             ->where($moneyBuyWhere)
-            ->whereBetween('settlementTime', $moneyBuyBetween)
+            // ->whereBetween('settlementTime', $moneyBuyBetween)
             ->get();
-        $winMoney = $userInfo['allWin'];
-        $loseMoney = $userInfo['allLose'];
+
+        $winMoney = $userInfo['allWin']?:0;
+        $loseMoney = $userInfo['allLose']?:0;
         // 单式盈利.
         foreach ($getMoneyBuyMth as $key => $value) {
             // 判断订单是否盈利
@@ -512,6 +646,7 @@ class MoneyBuy extends Model {
                 $loseMoney += $value->bet_money;
             }
         }
+
         // 串式盈利.
         foreach ($mnyBuyStrData as $key => $value) {
             // 判断订单是否盈利

+ 1 - 1
Application/Api/Model/MoneyRecharge.php

@@ -96,7 +96,7 @@ class MoneyRecharge extends Model {
         // 起始查询位置
         $begin = ($currentPage - 1) * $pageSize;
         $rechargeRecord = lm('money_recharge', "commons");
-        $rechargeRecordSelect = ['id', 'info_identity', 'order_id', 'apply_time', 'money', 'recharge_type', 'money_cash'];
+        $rechargeRecordSelect = ['id','status', 'info_identity', 'order_id', 'apply_time', 'money', 'recharge_type', 'money_cash'];
         // 获取盈亏记录
         $result['list'] = $rechargeRecord -> rechargeRecord($rechargeRecordSelect, $rechargeRecordWhere, $rechargeRecordBetween, $begin, $pageSize);
         // 获取记录总数

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

@@ -23,9 +23,11 @@ class Money_buy_match extends Model {
      * @param mixed $begin 起始查询位置
      * @param mixed $pageSize 分页大小
      * @param mixed $orderBy 排序字段
+     * $order_ids  arr 订单id
      * @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) {
@@ -35,6 +37,7 @@ class Money_buy_match extends Model {
         if (!empty($where)) {
             $result = $result -> where($where);
         }
+
         // 循环获取or查询
         if (!empty($orWhere)) {
             foreach ($orWhere as $value) {
@@ -49,6 +52,7 @@ class Money_buy_match extends Model {
                 });
             }
         }
+
         // 查询起始
         if (strlen($begin)) {
             $result = $result -> offset($begin);
@@ -62,12 +66,76 @@ class Money_buy_match extends Model {
         foreach ($orderBy as $key => $value) {
             $result = $result -> orderBy($key, $value);
         }
+
         // 获取数据
         $result = $result -> get();
+        return $result;
+    }
+
+    /**
+     * 按注单id查询
+     */
+    public function moneyBuyMatch_v1($select, $where = '', $orWhere = '', $begin = '', $pageSize = '', $orderBy = ['order_id' => 'desc'],$order_ids = []) {
+        // 查询字段
+        $result = $this -> select($select)
+        // ->join('st_odds_code', 'st_odds_code.odds_code', '=', 'money_buy_match.odds_code')
+        // ->join('st_odds_code', 'st_odds_code.game_code', '=', 'money_buy_match.game_code')
+        ->join('st_odds_code', function ($join) {
+            $join->on('money_buy_match.odds_code', '=','st_odds_code.odds_code')->on('money_buy_match.game_code', '=','st_odds_code.game_code');
+        })
+        // ->where($where)
+        ->whereIn('order_id',$order_ids)
+        // ->limit($pageSize)
+        ->orderBy('order_id', 'desc')
+        // ->offset($begin)
+        ->get();
+        
+        
+        
+        //            ->join('money_details', 'money_details.info_identity', '=', 'money_buy_simplex.info_identity')
+
+        /*
+        // 查询条件
+        if (!empty($where)) {
+            $result = $result -> where($where);
+        }
+
+        // 循环获取or查询
+        if (!empty($orWhere)) {
+            foreach ($orWhere as $value) {
+                $result = $result -> where(function($query) use ($value) {
+                    foreach ($value as $k => $v) {
+                        if ($k == 0) {
+                            $query = $query -> where([$v[0] => $v[1]]);
+                        } else {
+                            $query = $query -> orWhere([$v[0] => $v[1]]);
+                        }
+                    }
+                });
+            }
+        }
+
+        // 查询起始
+        if (strlen($begin)) {
+            $result = $result -> offset($begin);
+        }
 
+        // 分页大小
+        if (strlen($pageSize)) {
+            $result = $result -> limit($pageSize);
+        }
+        // 循环排序规则
+        foreach ($orderBy as $key => $value) {
+            $result = $result -> orderBy($key, $value);
+        }
+
+        // 获取数据
+        $result = $result -> get();
+        */
         return $result;
     }
 
+
     /**
      * 投注记录
      *

+ 1 - 0
Application/Commons/Model/Money_buy_str.php

@@ -30,6 +30,7 @@ class Money_buy_str extends Model {
      * @return array JsonString
      */
     public function moneyBuyStr($select, $where = '', $between = '', $begin = '', $pageSize = '', $toArray = 0, $orderBy = ['money_time' => 'desc'], $join = '') {
+        
         // 查询字段
         $result = $this -> select($select);
         // 循环关联

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

@@ -40,7 +40,7 @@ class St_competition extends Model {
                     $result = $result -> orWhere([$this->table.'.id' => $value]);
                 }
             }
-            $result = $result -> get();
+            $result = $result -> get()->toArray();
         } else {
             $result = [];
         }

+ 3 - 1
Application/Sports/Controller/Head.php

@@ -34,7 +34,7 @@ class Head extends Controller{
      * 返回首页球类列表
      */
     public function ballList (){
-        $ret = lm('GameType', 'Sports')->select('id','game_name','game_code','game_ico_url')->where('status',1)->get();
+        $ret = lm('GameType', 'Sports')->select('id','game_name','game_code','game_ico_url')->where('status',1)->where([['id','<',12]])->get();
 
         if(!empty($ret)) Render($ret, '1', lang('Tips','Sports')->get('success'));
 
@@ -171,6 +171,7 @@ class Head extends Controller{
         //合并所有球类赛事
         $matchAll = array_merge_recursive($ZQmatchData,$LQmatchData,$WQmatchData,$BQmatchData);
 
+        /*
         //获取所有冠军盘口
         $where = [
             ['type','=',1],
@@ -183,6 +184,7 @@ class Head extends Controller{
         $BQoddsData = BQoddsModel::getOddsData($where,$select)->toArray();
         //合并所有球类冠军盘口
         $oddsAll = array_merge_recursive($ZQoddsData,$LQoddsData,$WQoddsData,$BQoddsData);
+        */
      
         $StRollBall = [];
         $StSoon = [];

+ 12 - 2
Application/Sports/Controller/MatchList.php

@@ -522,10 +522,14 @@ class  MatchList extends Controller {
             }else{
                 $where[] = ['is_stringscene','=',0];
             }
+            //根据球类追加获取限定玩法
+            $p_code =  $this->commonFunction->getOddsPcode($game_code);
+
             $oddsData = lm($model_odds, 'Sports')
-                ->select('sort','p_code','id','odds_only','odds_code',$model_odds.'.status','odds','condition','sort','source','utime')
+                ->select('sort','p_code','id','match_id','odds_only','odds_code',$model_odds.'.status','odds','condition','sort','source','utime')
                 ->where([$model_odds.'.match_id'=>$matchID,$model_odds.'.type'=>0])
                 ->where($where)
+                ->whereIn('p_code',$p_code)
                 ->orderBy('sort', 'desc')
                 ->orderBy('p_code','desc')
                 ->orderBy('odds_code','desc')
@@ -564,6 +568,8 @@ where a.match_id = b.match_id and a.id = b.id ";
                     $guest_score = $match_result_record[0]->guest_score?:0;
                     $matchData->match_score = $home_score.'-'.$guest_score;
                     $matchData->result_mark = $match_result_record[0]->result_mark;
+                   
+
                 }
 
                 //如果是网球
@@ -592,7 +598,8 @@ where a.match_id = b.match_id and a.id = b.id ";
                     $matchData->match_score = $home_score.'-'.$guest_score;
                     $matchData->result_mark = '';
                 }
-                $matchData->ptime = $match_result_record[0]->a_time?:0;
+                $matchData->ptime =  $match_result_record[0]->a_time;
+                $matchData->match_process =  $match_result_record[0]->match_process;
             }
 
             //赛事已结束
@@ -631,6 +638,8 @@ where a.match_id = b.match_id and a.id = b.id ";
             foreach ($oddsData as $key=>$item){
                 //获取数据源ID
                 $item['sourceID'] = $this->commonFunction->getSourceID($item['source']);
+                $item['mark'] = $game_code.'-'.$item['match_id'].'-'.$item['p_code'].'-'.$item['odds_code'].'-'.$item['sort'];
+
                 unset($item['source']);
                 //追加所属赔率状态
                 $item['oddsType'] = '';
@@ -663,6 +672,7 @@ where a.match_id = b.match_id and a.id = b.id ";
                 'guest_team'=>$matchData->guest_team,
                 'match_time'=>$matchData->match_date." ".$matchData->match_time,
                 'match_ptime'=>$matchData->ptime,
+                'match_process'=>$matchData->match_process?:'',
                 'match_score'=>$matchData->match_score,
                 'p_code_array'=> $p_code_array,
                 'result_mark'=>$matchData->result_mark,

+ 118 - 8
Application/Sports/Controller/MatchListWeb.php

@@ -155,17 +155,116 @@ class MatchListWeb extends Controller{
         }
          //将为空的数组去除
          $matchDataNum = array_filter($matchDataNum) ;
-        if(empty($matchDataNum)) Render('', '1', lang('Tips','Sports')->get('success'));
-        Render($matchDataNum, '1', lang('Tips','Sports')->get('success'));
+                //==补充缺少玩法==
+        //默认玩法
+        $codeData=[
+            [
+                'game_code'=>'zq',
+                'game_num'=>0,
+                'p_code'=>'B',
+                'code_num'=>0
+            ],
+            [
+                'game_code'=>'zq',
+                'game_num'=>0,
+                'p_code'=>'CO',
+                'code_num'=>0
+            ],
+            [
+                'game_code'=>'zq',
+                'game_num'=>0,
+                'p_code'=>'C',
+                'code_num'=>0
+            ],
+            [
+                'game_code'=>'zq',
+                'game_num'=>0,
+                'p_code'=>'TS',
+                'code_num'=>0
+            ],
+            [
+                'game_code'=>'zq',
+                'game_num'=>0,
+                'p_code'=>'TG',
+                'code_num'=>0
+            ],
+            // [
+            //     'game_code'=>'zq',
+            //     'game_num'=>0,
+            //     'p_code'=>'kemp',
+            //     'code_num'=>0
+            // ],
+            [
+                'game_code'=>'bq',
+                'game_num'=>0,
+                'p_code'=>'CO',
+                'code_num'=>0
+            ],
+            [
+                'game_code'=>'bq',
+                'game_num'=>0,
+                'p_code'=>'B',
+                'code_num'=>0
+            ],
+            // [
+            //     'game_code'=>'bq',
+            //     'game_num'=>0,
+            //     'p_code'=>'kemp',
+            //     'code_num'=>0
+            // ],
+            [
+                'game_code'=>'wq',
+                'game_num'=>0,
+                'p_code'=>'CO',
+                'code_num'=>0
+            ],
+            // [
+            //     'game_code'=>'wq',
+            //     'game_num'=>0,
+            //     'p_code'=>'kemp',
+            //     'code_num'=>0
+            // ],
+            // [
+            //     'game_code'=>'lq',
+            //     'game_num'=>0,
+            //     'p_code'=>'kemp',
+            //     'code_num'=>0
+            // ],
+            [
+                'game_code'=>'lq',
+                'game_num'=>0,
+                'p_code'=>'CO',
+                'code_num'=>0
+            ]
+        ];
+        if(empty($matchDataNum)) Render($codeData, '1', lang('Tips','Sports')->get('success'));
+
+
+        foreach($codeData as $k=>$v){
+            foreach($matchDataNum as $kk=>$vv){
+                if($v['game_code'] == $vv['game_code'] and $v['p_code'] == $vv['p_code']){
+                    $codeData[$k] = $vv;
+                }
+                if($vv['game_code'] == 'wq' and $v['game_code'] == 'wq' and $vv['p_code'] == 'C'){
+                    $v['game_num'] = $vv['game_num'];
+                    $v['code_num'] = $vv['code_num'];
+
+                    $codeData[$k] = $v;
+                }
+            }
+        }
+
+        Render($codeData, '1', lang('Tips','Sports')->get('success'));
     }
 
     /*
-     * 获取赛事数据
+     * 获取赛事数据1
      */
     public function getMatchData($type,$game_code,$p_code='',$time='',$lg_ids=[],$search=''){
+
         //$p_code 获取具体玩法下的赛事数据
         $models = $this->commonFunction->getModels($game_code,1);
-        $where = $this->commonFunction->getState($type,$models['model_match'],$game_code);
+        $where = $this->commonFunction->getState($type,$models['model_match'],$game_code, $p_code);
 
         $select = [$models['model_match'].'.id as match_id',$models['model_match'].'.lg_id'];
         $timeWhere = [];
@@ -173,9 +272,13 @@ class MatchListWeb extends Controller{
         if($p_code){
             //时间条件
             if(!empty($time)){
-                if($time == 'all'){
+                if($time == 'all'){//全部七天
                     $timeWhere[] = ['match_date','<',date("Y-m-d",strtotime("+1weeks",strtotime(date('Y-m-d',time()))))];
-                }else{
+                } 
+                else if($time == 'other'){//七天后 所有
+                    $timeWhere[] = ['match_date','>',date("Y-m-d",strtotime("+1weeks",strtotime(date('Y-m-d',time()))))];
+                }
+                else{//根据 传入 日期
                     $timeWhere[] = ['match_date',$time];
                 }
             }
@@ -323,6 +426,8 @@ where a.match_id = b.match_id and a.id = b.id ";
             $matchData =  $this->commonFunction->array_unset_tt($matchData,'lg_id');
 
             foreach ($oddsCodeNum as $k=>$v){
+                $v['mark'] = 'gj-'.$game_code.'-'.$v['lg_id'].'-'.$v['p_code'].'-'.$v['odds_code'].'-'.$v['sort'];
+
                 foreach ($matchData as $kk => $vv){
                     if($v['lg_id'] == $vv['lg_id']){
                         $match_odds[$kk]['area_id'] = $vv['area_id'];
@@ -401,6 +506,8 @@ where a.match_id = b.match_id and a.id = b.id ";
         }
         //处理非冠军盘口
         foreach ($oddsCodeNum as $k=>$v){
+            $v['mark'] = $game_code.'-'.$v['match_id'].'-'.$v['p_code'].'-'.$v['odds_code'].'-'.$v['sort'];
+
             //没有玩法代码 则为滚球,追加结果数据
             if(empty($p_code)){
                 foreach ($matchData as $kk=>$vv){
@@ -537,7 +644,8 @@ where a.match_id = b.match_id and a.id = b.id ";
     /*
      * 根据match_id获取赔率数据
      */
-    public function getOddsData($game_code,$model_odds,$match_ids=[],$lg_ids=[],$p_code='',$type=''){
+    public function getOddsData($game_code,$model_odds,$match_ids=[],$lg_ids=[],$p_code='',$type='', $matchData = []){
+
         //获取pc版各球类滚球/让球玩法代码
         $get_DefaultOdds = require "Config/DefaultOdds.php";
         $DefaultOddsRoll = $get_DefaultOdds['PC_StRollBall'];//滚球
@@ -628,7 +736,7 @@ where a.match_id = b.match_id and a.id = b.id ";
             ['type','=',1],
         ];
         $select = ['match_id','type'];
-       
+
         $oddsData_gj_num = lm($model_odds,"Sports")
             // ->select($select)
             ->where($where)
@@ -652,7 +760,9 @@ where a.match_id = b.match_id and a.id = b.id ";
         $oddsCodeNum['kemp']['code_num'] = count($oddsData_gj_num);
 
         sort($oddsCodeNum);
+
         return $oddsCodeNum;
+        //==end==
     }
 
     //获取直播数据

+ 310 - 0
Application/Sports/Controller/MatchVer.php

@@ -0,0 +1,310 @@
+<?php
+
+namespace App\Sports\Controller;
+
+use BaseController\Controller;
+
+use Biz\Account\AccountManager;
+
+/**
+ * 赛事数据验证
+ * Tank.peng
+ * 2019/11/6
+ */
+class MatchVer extends Controller
+{
+    public function init() {
+        $this->time = date('Y-m-d H:i:s',time());
+        $this->accountManager = new AccountManager();
+        $this->commonFunction =  C()->get('commonFunction');
+    }
+
+    /**
+     * 验证 赛事赔率/比分 是否发生变更
+     */
+    public function VerOddsScore(){
+        /*
+        //拼装请求数据
+        $data = [
+            [
+                'game_code'=>'zq',//球类代码
+                'match_id'=>123,//赛事id
+                'home_score'=>1,//主队得分/进球 如果是滚球让球
+                'guest_score'=>2,//客队得分/进球 如果是滚球让球
+                'odds_only'=>'34f8e550779c6446c05d2dd2bb969631'//赔率uuid
+            ],
+            [
+                'game_code'=>'lq',
+                'match_id'=>123,
+                'home_score'=>1,
+                'guest_score'=>2,
+                'odds_only'=>'5c890c276384c40648760233194067b9'
+            ]
+
+        ];
+        */
+
+        //获取 查询数据
+        $data_json = $_REQUEST['data'];
+        // $token = $_REQUEST['token'];
+
+        // if(empty($data_json)){
+        //     Render('', '51029',lang('Errors','Api')->get('error-51029'));
+        // }
+
+        //验证用户token
+        // $this->getAgent($token);
+
+        //数据转arr
+        $data_arr = json_decode($data_json,true);
+        if(empty($data_arr)) Render('', '10030', lang('Errors','Sports')->get('error-10030'));
+        //循环处理 根据球类分组
+        //足球 赛事数据
+        $zq_data = [];
+        //篮球 赛事数据
+        $lq_data = [];
+        //网球 赛事数据
+        $wq_data = [];
+        //棒球 赛事数据
+        $bq_data = [];
+        foreach($data_arr as $k=>$v){
+            //序号 赋值
+            $v['sort'] = $k;
+            //状态 默认0 待处理 1正常 2赛事状态异常  3赔率异常 4赛事比分有更新
+            $v['status'] = 1;
+            //异常提示
+            $v['ver_mark'] = '正常';
+            //足球
+            if($v['game_code'] == 'zq'){
+                $zq_data[] = $v;
+            }
+            //篮球
+            if($v['game_code'] == 'lq'){
+                $lq_data[] = $v;
+            }
+            //网球
+            if($v['game_code'] == 'wq'){
+                $wq_data[] = $v;
+            }
+            //棒球
+            if($v['game_code'] == 'bq'){
+                $bq_data[] = $v;
+            }
+            $data_arr[$k] = $v;
+        }
+        //处理 足球
+        $zq_odd_err = [];
+        if(!empty($zq_data)){
+            $zq_odd_err = $this->verOddsData('zq',$zq_data);
+        }
+        //处理 篮球
+        $lq_odd_err = [];
+        if(!empty($lq_data)){
+            $lq_odd_err = $this->verOddsData('lq',$lq_data);
+        }
+        //处理 网球
+        $wq_odd_err = [];
+        if(!empty($wq_data)){
+            $wq_odd_err = $this->verOddsData('wq',$wq_data);
+        }
+        //处理 棒球
+        $bq_odd_err = [];
+        if(!empty($bq_data)){
+            $bq_odd_err = $this->verOddsData('bq',$bq_data);
+        }
+
+        //合并各球类异常投注项
+        $all_err = array_merge($zq_odd_err,$lq_odd_err,$wq_odd_err,$bq_odd_err);
+
+
+        //如果有异常投注数据
+        if(!empty($all_err)){
+            //合并 投注赔率数据
+            foreach($data_arr as $k=>$v){
+                foreach($all_err as $kk=>$vv){
+                    if($v['sort'] == $vv['sort']){
+                        $data_arr[$k] = $vv;
+                    }
+                }
+            }
+        }else{
+            $data_arr = 'ok';
+        }
+              
+        //验证比分是否发生变化
+        Render($data_arr, '1', lang('Tips','Sports')->get('success'));
+    }
+    
+    /**
+     * 验证投注内容 
+     */
+    public function verOddsData($game_code,$oddsData){
+        //获取model
+        $getModels = $this->commonFunction->getModels($game_code);
+        //获取赛事id
+        $match_ids = array_column($oddsData,'match_id');
+        //获取赔率odds_only
+        $odds_onlys =  array_column($oddsData,'odds_only');
+        //比分正常 投注项
+        $score_pass = [];
+        //比分异常 投注项
+        $score_err = [];
+        //玩法赔率正常 投注项
+        $odds_pass = [];
+        //玩法赔率 异常 投注项
+        $odds_err = [];
+        //赛事状态异常的 投注项
+        $status_err = [];
+        //赛事状态正常的 投注项
+        $status_pass = [];
+
+        //根据赛事id 获取赛事状态
+        $match_status = $this->getMatchStatus($match_ids,$getModels);
+        //验证赛事状态是否异常
+        if(!empty($match_status)){
+            
+            foreach($match_status as $k=>$v){
+                foreach($oddsData as $kk=>$vv){
+                    if($v['match_id'] == $vv['match_id'] and $v['status'] > 1){
+                        $vv['status'] = 3;//赛事状态异常
+                        $vv['ver_mark'] = '玩法盘口已关闭';
+                        $status_err[] = $vv;
+                        //排除当前投注项
+                        unset($oddsData[$kk]);
+                    }
+                }
+            }
+
+            //当前正常投注项
+            $status_pass = $oddsData;
+        }
+
+         //如果 还有投注项 验证玩法赔率
+         if(!empty($status_pass)){
+            //根据赔率uuid 验证是否存在
+            $odds_data = $this->getOdds($odds_onlys,$getModels);
+           
+            foreach($status_pass as $k=>$v){
+                if(!empty($odds_data)){
+                    foreach($odds_data as $kk=>$vv){
+                        if($v['odds_only'] == $vv['odds_only']){
+                            $odds_pass[] = $v;
+                            //排除当前投注项
+                            unset($status_pass[$k]);
+                        }
+                    }
+                }
+            }
+
+            //赋值异常 投注
+            if(!empty($status_pass)){
+                foreach($status_pass as $k=>$v){
+                    $v['status'] = 4;//赔率数据异常
+                    $v['ver_mark'] = '赔率已更新';
+                    $odds_err[] = $v;
+                }
+            }
+        }
+
+        //如果 还有投注项 验证赛事比分
+        if(!empty($odds_pass)){
+            //根据赛事id 获取赛事比分
+            $match_score = $this->getMatchScore($match_ids,$getModels,$game_code);
+            foreach($odds_pass as $k=>$v){
+                foreach($match_score as $kk=>$vv){
+                    //获取异常
+                    if($v['match_id'] == $vv->match_id ){
+                        if($v['home_score'] != $vv->home_score || $v['guest_score'] != $vv->guest_score){
+                            $v['status'] = 2;//比分数据异常
+                            $v['ver_mark'] = '比分发生变化';
+                            $score_err[] = $v;
+                            unset($odds_pass[$k]);
+                        }
+                    }
+                }
+            }
+
+            //赋值正常 投注
+            $score_pass = $odds_pass;
+        }
+        //合并以上所有异常
+        $score_err = [];
+        $all_err = array_merge_recursive($status_err,$odds_err,$score_err);
+        return $all_err;
+    }
+
+    /**
+     * 获取各球类 指定赛事 状态
+     */
+    public function getMatchStatus($match_ids,$getModels){
+        
+        $match_model = $getModels['model_match'];
+        $match_status = lm($match_model, 'Sports')
+            ->select('id as match_id','status')
+            ->whereIn('id',$match_ids)
+            ->get()
+            ->toArray();
+
+        return $match_status;
+    }
+
+    /**
+     * 获取各球类 指定赛事 比分
+     */
+    public function getMatchScore($match_ids,$getModels,$game_code){
+
+        $match_ids_str = implode(",", $match_ids);
+        $result_record = $getModels['model_result_record'];
+
+         //如果是网球
+         if($game_code == 'wq'){
+            $sql = "select a.match_id,a.home_player_score as home_score,a.guest_player_score as guest_score,a.match_time as a_time,a.match_process,a.result_mark from $result_record a,
+(select match_id,max(id) id from $result_record where match_id IN ($match_ids_str) group by match_id)b
+where a.match_id = b.match_id and a.id = b.id ";
+        }else
+        //如果是棒球
+        if($game_code == 'bq' || $game_code == 'lq'){
+            $sql = "select a.match_id,a.home_score,a.guest_score,a.match_time as a_time,a.match_process,a.result_mark from $result_record a,
+(select match_id,max(id) id from $result_record where match_id IN ($match_ids_str) group by match_id)b
+where a.match_id = b.match_id and a.id = b.id ";
+        }else{
+            //其他球类
+            $sql = "select a.match_id,a.home_score,a.guest_score,a.match_time as a_time,a.match_process from $result_record a,
+(select match_id,max(id) id from $result_record where match_id IN ($match_ids_str) group by match_id)b
+where a.match_id = b.match_id and a.id = b.id ";
+        }
+        //查询 赛事结果记录最新的一条
+        $match_result_record = S ('DB')->select ($sql);
+
+        return $match_result_record;
+    }
+
+    /**
+     * 获取存在赔率
+     */
+    public function getOdds($odds_onlys,$getModels){
+        $model_odds = $getModels['model_odds'];
+
+        $odds_data = lm($model_odds,'Sports')
+            ->select('odds_only')
+            ->whereIn('odds_only',$odds_onlys)
+            ->get()
+            ->toArray();
+
+        return $odds_data;
+    }
+
+    /**
+     * token获取用户详情
+     */
+    public function getAgent($token = '') {
+        $checkToken = $this->accountManager->checkEffectiveTime($token);
+        if ($checkToken['status'] != 1) {
+            Render($checkToken['data'], $checkToken['status'], lang('commons')->get('user does login'));
+        };
+    }
+}
+
+
+
+

+ 15 - 1
Application/Sports/Controller/ResultMatch.php

@@ -51,9 +51,23 @@ class ResultMatch extends Controller{
                 ->get()
                 ->toArray();
 
+            //获取各球类查询字段
+            if($game_code == 'zq'){
+                $select = ['league_id','league_name','match_date','match_time','home_team','guest_team','score_half','score_full','play_data','c_time','source','match_id'];
+            }
+            if($game_code == 'lq'){
+                $select = ['league_id','league_name','match_date','match_time','home_team','guest_team','score_half','score_below','score_result','play_data','c_time','source','match_id'];
+            }
+            if($game_code == 'wq'){
+                $select = ['league_id','league_name','match_date','match_time','home_team','guest_team','score_half','score_full','score_result','play_data','c_time','source','match_id'];
+            }
+            if($game_code == 'bq'){
+                $select = ['league_id','league_name','match_date','match_time','home_team','guest_team','score_half','score_full','score_result','play_data','c_time','source','match_id'];
+            }
+
             //获取赛事数据
             $match_result_match = lm($model_result_express,"Sports")
-                ->select('league_id','league_name','match_date','match_time','home_team','guest_team','score_half','score_full','play_data','c_time','source','match_id')
+                ->select($select)
                 ->where($where)
                 ->get()
                 ->toArray();

+ 85 - 0
Application/Sports/Controller/RuleMatch.php

@@ -0,0 +1,85 @@
+<?php
+namespace App\Sports\Controller;
+
+use BaseController\Controller;
+use Biz\Match\GetmatchData;
+use Biz\Match\GetOddsData;
+
+/**
+ * 前台赛事规则数据接口
+ * User: tank
+ * Date: 2019/10/11
+ */
+class RuleMatch extends Controller{
+    public function init() {
+        $this->commonFunction =  C()->get('commonFunction');
+        $this->getTypeData = new GetmatchData();
+        $this->getOddsData = new GetOddsData();
+
+    }
+
+    /**
+     * 获取各球类玩法规则数据
+     */
+    public function getMatchRule(){
+        
+        //请求模块名称
+        $modular = $_REQUEST['modular']?:'体育';
+        //请求规则组名称
+        $group = $_REQUEST['group']?:'一般体育说明';
+        try {
+            if(empty($modular) || empty($group)){
+                throw new \Exception(Render([], '10001', lang('Tips','Sports')->get('PARAM_ERROR')));
+            }
+
+            //拼装查询条件
+            $where = [
+                ['modular_name','=',$modular],
+                ['group_name','=',$group],
+            ];
+
+            //获取各球类规则
+            $match_rule = lm('st_match_rule',"Sports")
+            ->select('modular_name','group_name','author','atime','utime','status','content')
+            ->where($where)
+            ->first()
+            ->toArray();
+
+            //获取所有模块/分组
+            $rule_menu = lm('st_match_rule_group',"Sports")
+            ->select('modular_id','modular_name','id as group_id','group_name')
+            ->get()
+            ->toArray();
+
+            //获取模块
+            $modular_data =  $this->commonFunction->array_unset_tt($rule_menu,'modular_name');
+
+            $rule_menu_data = [];
+            foreach($modular_data as $k=>$v){
+                $dd['modular_id'] = $v['modular_id'];
+                $dd['modular_name'] = $v['modular_name'];
+
+                foreach($rule_menu as $kk=>$vv){
+                    $ddd['group_id'] = $vv['group_id'];
+                    $ddd['group_name'] = $vv['group_name'];
+                    if($vv['modular_name'] == $k){
+                        $dd['group'][] = $ddd;
+                    }
+                }
+                $rule_menu_data[] = $dd;
+            }
+
+            $data = [
+                'rule_menu' =>$rule_menu_data,
+                'match_rule'=>$match_rule
+            ];
+
+
+            Render($data, '1', lang('Tips','Sports')->get('success'));
+        } catch (\Exception $e) {
+            echo $e->getMessage();
+        }
+    }
+
+
+}

+ 7 - 0
Application/Sports/Lang/Errors.php

@@ -53,6 +53,13 @@ return array(
     'error-10023' => '联赛赛季结束时间不存在',
     'error-10024' => '所属上半场赛事不存在',
     'error-10025' => '无权操作',
+    'error-10026' => '无法获取该订单金额数据',
+    'error-10027' => '更新订单状态失败',
+    'error-10028' => '更新用户资金失败',
+    'error-10029' => '写入资金变动失败',
+    'error-10030' => '订单不存在',
+    'error-10031' => '订单非投注状态,不可撤单',
+
 
 
 

+ 5 - 5
Application/Sports/Lang/GameTypes.php

@@ -25,9 +25,9 @@ return array(
         'type_code' => 'StStringScene',
         'type_name' => '串场',
     ] ,
-    [
-        'type_id' => 6,
-        'type_code' => 'StChampion',
-        'type_name' => '冠军',
-    ]
+    // [
+    //     'type_id' => 6,
+    //     'type_code' => 'StChampion',
+    //     'type_name' => '冠军',
+    // ]
 );

+ 7 - 0
Application/Sports/Lang/Tips.php

@@ -24,6 +24,13 @@ return array(
     'half_match_error' =>'所属上半场赛事不存在',
     'auth_error' => '无权操作',
 
+    'order_money_err' =>'无法获取该订单金额数据',
+    'order_status_up_err' => '更新订单状态失败',
+    'up_user_err' => '更新用户资金失败',
+    'add_money_err' => '写入资金变动记录失败',
+    'order_null' => '订单不存在',
+    'order_type_err' => '订单非投注状态,不可撤单',
+
     // ====end===
 
 

+ 14 - 0
Application/Sports/Model/St_match_rule.php

@@ -0,0 +1,14 @@
+<?php
+namespace App\Sports\Model;
+
+use \System\Model;
+
+/**
+ * Class Account
+ * @package App\Sports\Model
+ * 赛事规则
+ */
+class St_match_rule extends Model
+{
+    protected $table = 'st_match_rule';
+}

+ 14 - 0
Application/Sports/Model/St_match_rule_group.php

@@ -0,0 +1,14 @@
+<?php
+namespace App\Sports\Model;
+
+use \System\Model;
+
+/**
+ * Class Account
+ * @package App\Sports\Model
+ * 赛事规则组
+ */
+class St_match_rule_group extends Model
+{
+    protected $table = 'st_match_rule_group';
+}

+ 2 - 0
Application/Sports/Model/St_zq_competition.php

@@ -143,6 +143,7 @@ class St_zq_competition extends Model
                                 $matchData[$k]['home_score'] = $vv->home_score?:0;
                                 $matchData[$k]['guest_score'] = $vv->guest_score?:0;
                             }
+                            $matchData[$k]['result_mark'] = $vv->result_mark;
                             $matchData[$k]['a_time'] = $vv->a_time;//?:C()->get('commonFunction')->getMatchTime($v['match_date'],$v['match_time']);
                             $matchData[$k]['match_process'] = $vv->match_process;//?:C()->get('commonFunction')->getMatchProcess( $matchData[$k]['a_time'],$ret['game_code']);
                         }
@@ -157,6 +158,7 @@ class St_zq_competition extends Model
                         $matchData[$k]['home_score'] = 0;
                         $matchData[$k]['guest_score'] = 0;
                     }
+                    $matchData[$k]['result_mark'] = '';
                     $matchData[$k]['a_time'] = 0;//C()->get('commonFunction')->getMatchTime($v['match_date'],$v['match_time']);
                     $matchData[$k]['match_process'] = '';//C()->get('commonFunction')->getMatchProcess( $matchData[$k]['a_time'],$ret['game_code']);
                 }

+ 3 - 0
Biz/Account/AccountManager.php

@@ -513,6 +513,7 @@ class AccountManager
 
         $userInfo = lm('account_detailed', 'Commons')->join('account', 'account_detailed.account_identity', '=', 'account.identity')->where('account_detailed.token', $token)->first();
         if (empty($userInfo)) {
+            // Render([], '2001', lang('Common','Api') -> get('user does login'));
             return false;
         }
 //        $userInfo->identity = $userInfo->account_identity;
@@ -884,6 +885,8 @@ class AccountManager
      */
     public function logout($accountIdentity)
     {
+        lm('account_detailed', 'Commons')->where('account_identity', $accountIdentity)->update(['statuss' => '0']);
+
         $result = $this->repository->updateToken($accountIdentity);
         return $result;
     }

+ 1 - 1
Biz/Account/Repository/AccountRepository.php

@@ -201,7 +201,7 @@ class AccountRepository {
     public function updateToken($accountIdentity) {
         $token = $this->tokenManager->getToken();
         lm('account_detailed', 'Commons')->where('account_identity', $accountIdentity)->update(['token' => $token]);
-        lm('agent_detailed', 'Commons')->where('agent_identity', $accountIdentity)->update(['agent_token' => $token]);
+        //lm('agent_detailed', 'Commons')->where('agent_identity', $accountIdentity)->update(['agent_token' => $token]);
         unset($_SESSION['uinfo']);
         unset($_SESSION['agent']);
         $result = ['status' => 1, 'msg' => lang()->get('success')];

+ 91 - 34
Biz/Common/CommonFunction.php

@@ -1,5 +1,6 @@
 <?php
 namespace Biz\Common;
+use Biz\Db\Redis\RedisOP;
 
 class CommonFunction {
     function checkDebug()
@@ -723,7 +724,7 @@ class CommonFunction {
      * @throws \Exception
      * 获取不同状态下的 查询条件
      */
-    function getState($type_code,$model_match = '',$game_code){
+    function getState($type_code,$model_match = '',$game_code, $p_code){
         if($model_match == ''){
             switch ($type_code){
                 case 'StRollBall'://滚球 正在进行
@@ -876,27 +877,40 @@ class CommonFunction {
                    
                     break;
                 case 'StSoon'://即将 今日两小时内开始
-                    $where = [
-                        [$model_match.'.status','=','0'],
-                        [$model_match.'.match_date','=',date("Y-m-d")],
-                        [$model_match.'.match_time','<',date("H:i:s", strtotime("+2 hour"))],
-                        [$model_match.'.match_time','>',date("H:i:s", time())]
-                        /*
-                        [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
-                        */
-                    ];
+                    if($p_code == 'kemp'){
+                        $where = [
+                            [$model_match.'.status','<','2']
+                        ];
+                    }else{
+                        $where = [
+                            [$model_match.'.status','=','0'],
+                            [$model_match.'.match_date','=',date("Y-m-d")],
+                            [$model_match.'.match_time','<',date("H:i:s", strtotime("+2 hour"))],
+                            [$model_match.'.match_time','>',date("H:i:s", time())]
+                            /*
+                            [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
+                            */
+                        ];
+                    }
                     break;
                 case 'StToday'://今日 今日未开始未结束
-                    $where = [
-                        [$model_match.'.status', '<', '2'],
-                        [$model_match.'.match_date','=',date("Y-m-d")],
-                        [$model_match.'.match_time','>',date("H:i:s", time())],
-                        /*
-                        [$model_match.'.utime','>',date("Y-m-d").' 00:00:00'],
-                        [$model_match.'.is_today','=',1],
-                        [$model_match.'.type', '=', '1'],
-                        */
-                    ];
+                    if($p_code == 'kemp'){
+                        $where = [
+                            [$model_match.'.status', '<', '2'],
+                        ];
+                    }else{
+                        $where = [
+                            [$model_match.'.status', '<', '2'],
+                            [$model_match.'.match_date','=',date("Y-m-d")],
+                            [$model_match.'.match_time','>',date("H:i:s", time())],
+                            /*
+                            [$model_match.'.utime','>',date("Y-m-d").' 00:00:00'],
+                            [$model_match.'.is_today','=',1],
+                            [$model_match.'.type', '=', '1'],
+                            */
+                        ];
+                    }
+
                     break;
                 case 'all'://所有赛事
                     $where = [
@@ -904,19 +918,25 @@ class CommonFunction {
                     ];
                     break;
                 case 'StMorningPlate'://早盘
-                    //获取当天结束的时间戳
-                    $endTime = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1;
-                    $where = [
-                        [$model_match.'.status', '<', '2'],
-                        // [$model_match.'.is_morningplate','=',1],
-                        [$model_match.'.us_time','>',$this->qgmdate('Y-m-d H:i:s',$endTime , -4)],
-                        /*
-                        [$model_match.'.match_date','>',date("Y-m-d",time())],
-                        [$model_match.'.match_time','>',date("H:i:s", time())],
-                        [$model_match.'.type', '=', '2'],
-                        [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
-                        */
-                    ];
+                     if($p_code == 'kemp'){
+                         $where = [
+                             [$model_match.'.status', '<', '2']
+                         ];
+                     }else{
+                         //获取当天结束的时间戳
+                         $endTime = mktime(0,0,0,date('m'),date('d')+1,date('Y'))-1;
+                         $where = [
+                             [$model_match.'.status', '<', '2'],
+                             // [$model_match.'.is_morningplate','=',1],
+                             [$model_match.'.us_time','>',$this->qgmdate('Y-m-d H:i:s',$endTime , -4)],
+                             /*
+                             [$model_match.'.match_date','>',date("Y-m-d",time())],
+                             [$model_match.'.match_time','>',date("H:i:s", time())],
+                             [$model_match.'.type', '=', '2'],
+                             [$model_match.'.utime','>',date("Y-m-d").' 00:00:00']
+                             */
+                         ];
+                     }
                     break;
                 case 'StStringScene'://串场 查询串场状态为1 开赛时间大于当前时间
                     $where = [
@@ -1350,7 +1370,44 @@ class CommonFunction {
 			strtoupper(dechex(date('m'))).date('d').
 			substr(time(),-5).substr(microtime(),2,5).sprintf('d',rand(0,99));
 		return $order_sn;
-	}
+    }
+    
+    //根据球类追加限定玩法
+    function getOddsPcode($game_code = 'zq'){
+
+        $p_code = [];
+
+        if($game_code == 'zq'){
+            $p_code = ['C','B','TG','CB','TB','GS','CO','TS'];
+        }
+        if($game_code == 'lq'){
+            $p_code = ['LN','C','TN','TS','TB','CO'];
+        }
+        if($game_code == 'wq'){
+            $p_code = ['LB','TN','TS','B','LD','C'];
+        }
+        if($game_code == 'bq'){
+            $p_code = ['CO','C','TN','TS'];
+        }
+
+        return $p_code;
+    }
+
+    /**
+     * 追加写投注队列
+     * Tank
+     * 2019.11.16
+     * 订单号   比赛id188  开赛日期时间  比赛状态(早盘,今日,串场,滚球), 父级玩法, 子级玩法,排序
+     */
+    function setOrderQueue($orderData){
+        $data = json_encode($orderData,256);
+        $redis = (new RedisOP())->get();
+      
+        $redis->select(1);
+
+        $key = "ORDER_QUEUE";
+        $ret = $redis->lpush($key,$data);
+    }
 }
 
 ?>

+ 2 - 4
Biz/Db/Redis/RedisOP.php

@@ -20,17 +20,15 @@ class RedisOP
 
     public function __construct()
     {
-
-
         if (class_exists ('Redis')) {
             $redis = new \Redis();
-            $config = include ROOT_PATH . '/Config/redis.php';
+            $config = include ROOT_PATH . '/Config/Redis.php';
             if (!isset($config['host'])) return null;//throw new \ErrorException('服务器不存在!');
             $host = $config['host'];
             $port = isset($config['port']) ? $config['port'] : 6379;
 
             try{
-                $redis->connect ($host, $port, $this->timeout);// or die('连接失败!');
+               $redis->connect ($host, $port, $this->timeout);// or die('连接失败!');
             }catch (\ErrorException $e)
             {
                 $this->_redis = null;

+ 7 - 0
Biz/Match/GetOddsData.php

@@ -130,6 +130,7 @@ class GetOddsData {
                 if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
                     //获取数据源ID
                     $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
+                    $vvv['mark'] = 'zq'.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
                     unset($vvv['source']);
                     if($vvv['odds_code'] == $DefaultOdds['zq_concede_guest']){
                         $concede_g = $vvv;
@@ -206,6 +207,8 @@ class GetOddsData {
                 if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
                     //获取数据源ID
                     $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
+                    $vvv['mark'] = 'lq'.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
+
                     unset($vvv['source']);
                     if($vvv['odds_code'] == $DefaultOdds['lq_concede_guest']){
                         $concede_g = $vvv;
@@ -281,6 +284,8 @@ class GetOddsData {
                 if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
                     //获取数据源ID
                     $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
+                    $vvv['mark'] = 'wq'.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
+
                     unset($vvv['source']);
                     if($vvv['odds_code'] == $DefaultOdds['wq_dishes_guest']){
                         $concede_g = $vvv;
@@ -350,6 +355,8 @@ class GetOddsData {
                 if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
                     //获取数据源ID
                     $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
+                    $vvv['mark'] = 'bq'.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
+
                     unset($vvv['source']);
                     if($vvv['odds_code'] == $DefaultOdds['bq_capot_home']){
                         $concede_g = $vvv;

+ 14 - 4
Biz/Match/GetmatchData.php

@@ -123,7 +123,9 @@ class GetmatchData {
                         if($type_code == 'StRollBall'){
                             $vvv['oddsType'] = 'StRollBall';
                         }
-                        if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
+                        $vvv['mark'] = $game_code.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
+
+                        if ($vv['match_id'] === $vvv['match_id'] and $vvv['sort']==0) {
                             //获取数据源ID
                             $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
                             unset($vvv['source']);
@@ -182,7 +184,8 @@ class GetmatchData {
                         if($type_code == 'StRollBall'){
                             $vvv['oddsType'] = 'StRollBall';
                         }
-                        if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
+                        $vvv['mark'] = $game_code.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
+                        if ($vv['match_id'] === $vvv['match_id'] and $vvv['sort']==0) {
                             //获取数据源ID
                             $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
                             unset($vvv['source']);
@@ -238,7 +241,9 @@ class GetmatchData {
                         if($type_code == 'StRollBall'){
                             $vvv['oddsType'] = 'StRollBall';
                         }
-                        if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
+                        $vvv['mark'] = $game_code.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
+
+                        if ($vv['match_id'] === $vvv['match_id'] and $vvv['sort']==0) {
                             //获取数据源ID
                             $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
                             unset($vvv['source']);
@@ -282,7 +287,9 @@ class GetmatchData {
                         if($type_code == 'StRollBall'){
                             $vvv['oddsType'] = 'StRollBall';
                         }
-                        if ($vv['match_id'] == $vvv['match_id'] and $vvv['sort']==0) {
+                        $vvv['mark'] = $game_code.'-'.$vvv['match_id'].'-'.$vvv['p_code'].'-'.$vvv['odds_code'].'-'.$vvv['sort'];
+
+                        if ($vv['match_id'] === $vvv['match_id'] and $vvv['sort']==0) {
                             //获取数据源ID
                             $vvv['sourceID'] = $this->commonFunction->getSourceID($vvv['source']);
                             unset($vvv['source']);
@@ -1001,6 +1008,8 @@ class GetmatchData {
                 if($v['match_id'] == $vv['match_id']){
                     //获取数据源ID
                     $vv['sourceID'] = $this->commonFunction->getSourceID($vv['source']);
+                    $vv['mark'] = 'zq'.'-'.$vv['match_id'].'-'.$vv['p_code'].'-'.$vv['odds_code'].'-'.$vv['sort'];
+                    
                     unset($vv['source']);
                     $matchData[$k]['oddsData'][] = $vv;
                 }
@@ -1055,6 +1064,7 @@ class GetmatchData {
         foreach($championData as $k=>$v){
             //获取数据源ID
             $v['sourceID'] = $this->commonFunction->getSourceID($v['source']);
+            $vv['mark'] = 'gj'.'-'.'zq'.'-'.$v['lg_id'].'-'.$v['p_code'].'-'.$v['odds_code'].'-'.$v['sort'];
             unset($v['source']);
             $p_code[$v['p_code']][]=$v;
         }

+ 25 - 0
Config/Redis.php

@@ -0,0 +1,25 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: scstf
+ * Date: 2018/9/22
+ * Time: 14:13
+ */
+// return [
+//     //'host'=>'192.168.2.250',
+//     'host' => 'redis.boyin168.com',
+//     'port' => 6379,
+//     'password' => 'liudada@888.'
+// ];
+
+// return [
+//     'host'=>'127.0.0.1',
+//     'port' => 6379,
+//     'password' => ''
+// ];
+
+return [
+    'host'=>'103.108.41.110',
+    'port' => 16379,
+    'password' => 'aqm1728'
+];

+ 4 - 2
vendor/illuminate/support/Testing/Fakes/QueueFake.php

@@ -2,11 +2,13 @@
 
 namespace Illuminate\Support\Testing\Fakes;
 
-use Illuminate\Queue\QueueManager;
+// use Illuminate\Queue\QueueManager;
 use Illuminate\Contracts\Queue\Queue;
 use PHPUnit\Framework\Assert as PHPUnit;
 
-class QueueFake extends QueueManager implements Queue
+// class QueueFake extends QueueManager implements Queue
+class QueueFake  implements Queue
+
 {
     /**
      * All of the jobs that have been pushed.

+ 30 - 30
web/index.html

@@ -1,37 +1,37 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" name=viewport><title>sports</title><link href=./static/css/app.8804c77e871cec36c29f74be57841e20.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.cec74a13fde1407db6c2.js></script><script type=text/javascript src=./static/js/vendor.275a314d2144e482fb7d.js></script><script type=text/javascript src=./static/js/app.8edbcafcead2d5036cdd.js></script></body><script src="http://kefu.bocai186.com/js/FloatingButton.js?v=0.101"></script><script>/**
-   * YDUI 可伸缩布局方案
-   * rem计算方式:设计图尺寸px / 100 = 实际rem  【例: 100px = 1rem,32px = .32rem】
-   */
-  !function (window) {
-    /* 设计图文档宽度 */
-    var docWidth = 100/1920;
+<!DOCTYPE html><html><head><meta charset=utf-8><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" name=viewport><title>sports</title><link href=./static/css/app.8a0fefd4c8e730d799003bccdbb42784.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.0cd03037df8a720cc875.js></script><script type=text/javascript src=./static/js/vendor.4b73492dbf1f41802c79.js></script><script type=text/javascript src=./static/js/app.3007858e6636e6c3e058.js></script></body><script>/**
+ * YDUI 可伸缩布局方案
+ * rem计算方式:设计图尺寸px / 100 = 实际rem  【例: 100px = 1rem,32px = .32rem】
+ */
+!function (window) {
+  /* 设计图文档宽度 */
+  var docWidth = 100/1920;
 
-    var doc = window.document,
-        docEl = doc.documentElement,
-        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
+  var doc = window.document,
+      docEl = doc.documentElement,
+      resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
 
-    var recalc = (function refreshRem () {
-        var clientWidth = docEl.getBoundingClientRect().width;
+  var recalc = (function refreshRem () {
+      var clientWidth = docEl.getBoundingClientRect().width;
 
-        /* 8.55:小于320px不再缩小,11.2:大于420px不再放大 */
-        docEl.style.fontSize =docWidth*clientWidth + 'px';//pcduan
-        //Math.max(Math.min(20 * (clientWidth / docWidth), 11.2), 8.55) * 9 + 'px';
-        return refreshRem;
-    })();
+      /* 8.55:小于320px不再缩小,11.2:大于420px不再放大 */
+      docEl.style.fontSize =docWidth*clientWidth + 'px';//pcduan
+      //Math.max(Math.min(20 * (clientWidth / docWidth), 11.2), 8.55) * 9 + 'px';
+      return refreshRem;
+  })();
 
-    /* 添加倍屏标识,安卓为1 */
-    docEl.setAttribute('data-dpr', window.navigator.appVersion.match(/iphone/gi) ? window.devicePixelRatio : 1);
+  /* 添加倍屏标识,安卓为1 */
+  docEl.setAttribute('data-dpr', window.navigator.appVersion.match(/iphone/gi) ? window.devicePixelRatio : 1);
 
-    if (/iP(hone|od|ad)/.test(window.navigator.userAgent)) {
-        /* 添加IOS标识 */
-        doc.documentElement.classList.add('ios');
-        /* IOS8以上给html添加hairline样式,以便特殊处理 */
-        if (parseInt(window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1], 10) >= 8)
-            doc.documentElement.classList.add('hairline');
-    }
+  if (/iP(hone|od|ad)/.test(window.navigator.userAgent)) {
+      /* 添加IOS标识 */
+      doc.documentElement.classList.add('ios');
+      /* IOS8以上给html添加hairline样式,以便特殊处理 */
+      if (parseInt(window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1], 10) >= 8)
+          doc.documentElement.classList.add('hairline');
+  }
 
-    if (!doc.addEventListener) return;
-    window.addEventListener(resizeEvt, recalc, false);
-    doc.addEventListener('DOMContentLoaded', recalc, false);
+  if (!doc.addEventListener) return;
+  window.addEventListener(resizeEvt, recalc, false);
+  doc.addEventListener('DOMContentLoaded', recalc, false);
 
-    }(window);</script></html>
+  }(window);</script></html>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.0642c2e9d28005bfab8bb465c133d316.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.0642c2e9d28005bfab8bb465c133d316.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.06a7f27a8be5ec6314ebc5e87600ad79.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.06a7f27a8be5ec6314ebc5e87600ad79.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.1372b9fc99cdf3006054b07173fef090.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.1372b9fc99cdf3006054b07173fef090.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.26760dd9aed8c9db523523b145fbd101.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.26760dd9aed8c9db523523b145fbd101.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.2c0af923485624503bc22dcd0b4ee174.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.2c0af923485624503bc22dcd0b4ee174.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.3c1c86bccf52e44229ba55063fc1f398.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.3c1c86bccf52e44229ba55063fc1f398.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.42f2a54821afde4a2d4f94b1cece8289.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.42f2a54821afde4a2d4f94b1cece8289.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.52daa5b2abd16ecbad3946232d481028.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.52daa5b2abd16ecbad3946232d481028.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.56c8344526062ce6d3b50be643f16ee8.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.56c8344526062ce6d3b50be643f16ee8.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.7440f7e9d065dea338e93728162ea53c.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.7440f7e9d065dea338e93728162ea53c.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.82ca9ce24f9d256f746c302e48728a40.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.82ca9ce24f9d256f746c302e48728a40.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.8a0fefd4c8e730d799003bccdbb42784.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.8a0fefd4c8e730d799003bccdbb42784.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.8ae19ed4a9be71f67a3fb96828e67840.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.8ae19ed4a9be71f67a3fb96828e67840.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.a6919b7678a23e82f1e389e725630766.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.a6919b7678a23e82f1e389e725630766.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.ab265f03e4ac0f748cc77471c5b40f78.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.ab265f03e4ac0f748cc77471c5b40f78.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.d073cbbb5a63ff4631859c7412269a3f.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.d073cbbb5a63ff4631859c7412269a3f.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.db2e9966fea3478b2bbd6380009000b4.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.db2e9966fea3478b2bbd6380009000b4.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.dc0f1ec05c32fb513c2575275cc3df4c.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.dc0f1ec05c32fb513c2575275cc3df4c.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.e4923a1cd308db187125abded99a8b31.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.e4923a1cd308db187125abded99a8b31.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.f7d8689c06043634c63404be15d158cf.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.f7d8689c06043634c63404be15d158cf.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.fa5b47d7bca4273363b2b524e0e9e420.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/css/app.fa5b47d7bca4273363b2b524e0e9e420.css.map


BIN
web/static/fonts/element-icons.535877f.woff


BIN
web/static/fonts/element-icons.732389d.ttf


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.0ad12877a98c800f60e8.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.0ad12877a98c800f60e8.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.380b056166f3b8007490.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.380b056166f3b8007490.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.60a55fd57a588754d786.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.60a55fd57a588754d786.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.a2fef489c0336b3ba337.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.a2fef489c0336b3ba337.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.b0199c779e87d60b180a.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.b0199c779e87d60b180a.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.c5cce7422d15378ea84a.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.c5cce7422d15378ea84a.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.e9d61018c0041383cdca.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.e9d61018c0041383cdca.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.fd735d1928fc9430cb57.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/0.fd735d1928fc9430cb57.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.0b7888f1227c78e19780.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.0b7888f1227c78e19780.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.0f17cc88a981dd2db4b4.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.0f17cc88a981dd2db4b4.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.164af5858b78b5497eda.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.164af5858b78b5497eda.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.40cefd191b7fb9291b2e.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.40cefd191b7fb9291b2e.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.46aa50df6c351f94be02.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.46aa50df6c351f94be02.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.50e159eed22009d4b9c7.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
web/static/js/1.50e159eed22009d4b9c7.js.map


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels