彭俊 hace 6 años
padre
commit
82a240fc8c

+ 2 - 2
app/Http/Controllers/Admin/SportsbkController.php

@@ -30,8 +30,8 @@ class SportsbkController extends Controller {
 		$dt->addColsFields('start_time', array('templet' => '#userdetail', 'sort' => true, 'width' => 160));
 		$dt->addColsFields('home_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
 		$dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
-		$dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 70));
-		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 70));
+		$dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 100));
+		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 100));
 		$dt->addColsFields('match_score', array('templet' => '#match_score','sort' => false, 'width' => 170));
 //		$dt->addColsFields('sectionone_two', array('templet' => '#sectionone_two', 'sort' => false, 'width' => 170));
 //		$dt->addColsFields('sectionthere_four', array('templet' => '#sectionthere_four', 'sort' => false, 'width' => 220));

+ 2 - 2
app/Http/Controllers/Admin/SportsbqController.php

@@ -29,9 +29,9 @@ class SportsbqController extends Controller {
         $dt->addColsFields('totime', array('templet' => '#totime', 'sort' => false, 'width' => 200));
         $dt->addColsFields('home_team', array('templet' => '#home_team', 'sort' => false, 'width' => 80));
         $dt->addColsFields('guest_team', array('templet' => '#guest_team', 'sort' => false, 'width' => 80));
-        $dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 100));
 		// $dt->addColsFields('csnum', array('templet' => '#home_rate', 'sort' => false, 'width' => 80));
-		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 110));		
+		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 100));
         $dt->addColsFields('match_score', array( 'templet' => '#match_score','sort' => false, 'width' => 220));//
         $dt->addColsFields('statusmatch', array('templet' => '#statusmatch', 'sort' => false, 'width' => 80));
         $dt->addColsFields('operation', array('templet' => '#operation', 'sort' => false, 'width' => 300));

+ 1 - 0
app/Http/Controllers/Admin/SportsfootController.php

@@ -773,6 +773,7 @@ class SportsfootController extends Controller {
 
         $newapp = new \App\Models\Stzqresult();
         $data = $newapp->resultlist($list, $page, $where, $orwhere);
+
         
         return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
     }

+ 2 - 2
app/Http/Controllers/Admin/SportswqController.php

@@ -36,9 +36,9 @@ class SportswqController extends Controller {
         $dt->addColsFields('start_time', array('templet' => '#home_team', 'sort' => false, 'width' => 155));
         $dt->addColsFields('home_player_name', array('templet' => '#home_team', 'sort' => false, 'width' => 130));
         $dt->addColsFields('guest_player_name', array('templet' => '#guest_team', 'sort' => false, 'width' => 130));
-        $dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 100));
 		// $dt->addColsFields('csnum', array('templet' => '#home_rate', 'sort' => false, 'width' => 80));
-		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 110));
+		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 100));
         $dt->addColsFields('match_score', array('templet' => '#matchscore', 'sort' => false, 'width' => 160));
         $dt->addColsFields('statusmatch', array('templet' => '#statusmatch', 'sort' => false, 'width' => 80));
         $dt->addColsFields('operation', array('templet' => '#operation', 'sort' => false, 'width' => 300));

+ 18 - 0
app/Models/MoneyBuyStr.php

@@ -372,5 +372,23 @@ class MoneyBuyStr extends BaseModel
         return $data;
     }
 
+    //获取串式注单信息
+    public function strmatchs()
+    {
+        $match = \App\Models\MoneyBuyMatch::select('match_id','batch_id')->where('bet_type',2)->get()->toArray ();
+        $str = $this->select('order_id','batch_id')->get()->toArray ();
+        for ($i=0; $i < count($str); $i++){
+            $str[$i]['match_ids'] = array();
+            for ($j=0; $j < count($match); $j++){
+                if($str[$i]['batch_id'] == $match[$j]['batch_id']){
+                    $str[$i]['match_ids'][] = $match[$j]['match_id'];
+                }
+            }
+        }
+
+        $data = $str;
+        return $data;
+    }
+
 
 }

+ 6 - 0
app/Models/SportsNoteList.php

@@ -1798,4 +1798,10 @@ class SportsNoteList extends BaseModel
             self::HandleMoney_v2($account_identitys,$order_ids,$order_sim,1);
         }
     }
+
+    //获取单式注单id,match_id
+    public function getsim($game_code){
+        $sim = $this->select('id','match_id')->where('game_code',$game_code)->get();
+        return $sim;
+    }
 }

+ 22 - 0
app/Models/Stbqresult.php

@@ -18,6 +18,28 @@ class Stbqresult extends BaseModel {
         } else { 
         	$data = $this->join('st_bq_league','st_bq_result.lg_id','=','st_bq_league.id')->join('st_bq_competition','st_bq_competition.id','=','st_bq_result.match_id')->select($this->table.'.id',$this->table.'.home_team',$this->table.'.guest_team',$this->table.'.match_id','st_bq_result.guest_team','st_bq_result.home_rate','st_bq_result.guest_rate','st_bq_result.first_score','st_bq_competition.status','st_bq_result.last_score','st_bq_result.match_score','st_bq_result.match_winer','st_bq_result.update_time','st_bq_competition.match_time','st_bq_result.match_process',$this->table.'.home_score',$this->table.'.guest_score',$this->table.'.u_guest_score',$this->table.'.u_home_score',$this->table.'.start_time','st_bq_league.name_chinese as saisname')->orderby('st_bq_result.id','desc')->paginate ($list);
         }
+
+        $newsim = new \App\Models\SportsNoteList();
+        $simplex = $newsim->getsim('bq');
+        $newstr = new \App\Models\MoneyBuyStr();
+        $str = $newstr->strmatchs();
+        //print_r($str);exit;
+        for ($i=0; $i < count($data); $i++) {
+            $data[$i]->numsim = 0;
+            for ($j=0; $j < count($simplex); $j++) {
+                if($simplex[$j]['match_id'] == $data[$i]->match_id){
+                    $data[$i]->numsim = $data[$i]->numsim+1;
+                }
+            }
+            $data[$i]->numstr = 0;
+            for ($a=0; $a < count($str); $a++) {
+                if(in_array($data[$i]->match_id,$str[$a]['match_ids'])){
+                    $data[$i]->numstr = $data[$i]->numstr+1;
+                }
+            }
+
+        }
+
         return $data->toArray ();
     }
 

+ 21 - 0
app/Models/Stlqresult.php

@@ -16,6 +16,27 @@ class Stlqresult extends BaseModel
             $data = $this->join('st_lq_league','st_lq_result.lg_id','=','st_lq_league.id')->join('st_lq_competition','st_lq_competition.id','=','st_lq_result.match_id')->select($this->table.'.id',$this->table.'.lg_id',$this->table.'.home_team',$this->table.'.guest_team',$this->table.'.home_rate',$this->table.'.guest_rate',$this->table.'.home_score',$this->table.'.guest_score',$this->table.'.all_goal','st_lq_competition.status',$this->table.'.first_score',$this->table.'.last_score',$this->table.'.match_score',$this->table.'.match_winer',$this->table.'.update_time',$this->table.'.match_time',$this->table.'.match_process',$this->table.'.tag',$this->table.'.match_id',$this->table.'.u_home_score',$this->table.'.start_time',$this->table.'.u_guest_score','st_lq_league.name_chinese')->orderby($this->table.'.id','desc')->paginate ($list); 
         }
 
+        $newsim = new \App\Models\SportsNoteList();
+        $simplex = $newsim->getsim('lq');
+        $newstr = new \App\Models\MoneyBuyStr();
+        $str = $newstr->strmatchs();
+        //print_r($str);exit;
+        for ($i=0; $i < count($data); $i++) {
+            $data[$i]->numsim = 0;
+            for ($j=0; $j < count($simplex); $j++) {
+                if($simplex[$j]['match_id'] == $data[$i]->match_id){
+                    $data[$i]->numsim = $data[$i]->numsim+1;
+                }
+            }
+            $data[$i]->numstr = 0;
+            for ($a=0; $a < count($str); $a++) {
+                if(in_array($data[$i]->match_id,$str[$a]['match_ids'])){
+                    $data[$i]->numstr = $data[$i]->numstr+1;
+                }
+            }
+
+        }
+
         return $data->toArray ();
 	}
 

+ 21 - 0
app/Models/Stwqresult.php

@@ -17,6 +17,27 @@ class Stwqresult extends Model
             $data = $this->join('st_wq_league','st_wq_result.lg_id','=','st_wq_league.id')->join('st_wq_competition','st_wq_competition.id','=','st_wq_result.match_id')->select($this->table.'.id',$this->table.'.home_player_name',$this->table.'.guest_player_name',$this->table.'.match_id','st_wq_result.first_score_player','st_wq_competition.status','st_wq_result.last_score_player','st_wq_result.match_score','st_wq_result.update_time','st_wq_competition.match_time','st_wq_result.match_process',$this->table.'.home_player_score',$this->table.'.guest_player_score',$this->table.'.start_time','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->paginate ($list); 
         }
 
+        $newsim = new \App\Models\SportsNoteList();
+        $simplex = $newsim->getsim('wq');
+        $newstr = new \App\Models\MoneyBuyStr();
+        $str = $newstr->strmatchs();
+        //print_r($str);exit;
+        for ($i=0; $i < count($data); $i++) {
+            $data[$i]->numsim = 0;
+            for ($j=0; $j < count($simplex); $j++) {
+                if($simplex[$j]['match_id'] == $data[$i]->match_id){
+                    $data[$i]->numsim = $data[$i]->numsim+1;
+                }
+            }
+            $data[$i]->numstr = 0;
+            for ($a=0; $a < count($str); $a++) {
+                if(in_array($data[$i]->match_id,$str[$a]['match_ids'])){
+                    $data[$i]->numstr = $data[$i]->numstr+1;
+                }
+            }
+
+        }
+
         return $data->toArray (); 
 
     }

+ 21 - 1
app/Models/Stzqresult.php

@@ -15,8 +15,28 @@ class Stzqresult extends BaseModel
         } else { 
             $data = $this->join('st_zq_league','st_zq_result.lg_id','=','st_zq_league.id')->join('st_zq_competition','st_zq_competition.id','=','st_zq_result.match_id')->select($this->table.'.id',$this->table.'.home_team',$this->table.'.guest_team',$this->table.'.match_id','st_zq_result.guest_team','st_zq_result.home_rate','st_zq_result.guest_rate','st_zq_result.first_score','st_zq_competition.status','st_zq_result.last_score','st_zq_result.match_score','st_zq_result.match_winer','st_zq_result.update_time','st_zq_competition.match_time','st_zq_result.match_process',$this->table.'.home_score',$this->table.'.guest_score',$this->table.'.u_guest_score',$this->table.'.u_home_score',$this->table.'.start_time','st_zq_league.name_chinese as saisname')->orderby('st_zq_result.match_id','desc')->paginate ($list);
         }
-        for ($i=0; $i < count($data); $i++) { 
+
+        $newsim = new \App\Models\SportsNoteList();
+        $simplex = $newsim->getsim('zq');
+        $newstr = new \App\Models\MoneyBuyStr();
+        $str = $newstr->strmatchs();
+        //print_r($str);exit;
+        for ($i=0; $i < count($data); $i++) {
             $data[$i]->newstime = date("Y-m-d H:i:s");
+
+            $data[$i]->numsim = 0;
+            for ($j=0; $j < count($simplex); $j++) {
+                if($simplex[$j]['match_id'] == $data[$i]->match_id){
+                    $data[$i]->numsim = $data[$i]->numsim+1;
+                }
+            }
+            $data[$i]->numstr = 0;
+            for ($a=0; $a < count($str); $a++) {
+                if(in_array($data[$i]->match_id,$str[$a]['match_ids'])){
+                    $data[$i]->numstr = $data[$i]->numstr+1;
+                }
+            }
+
         }
 
         return $data->toArray ();

+ 2 - 2
resources/lang/zh-cn/Sportsbq.php

@@ -25,8 +25,8 @@ return array(
     'u_guest_score' => '上半场-客队进球数',
     'source' => '数据来源',
     'newtime' => '联赛',
-    'dsnum' => '单式注单',
-    'csnum' => '串式注单',
+    'dsnum' => '单式注单',
+    'csnum' => '串式注单',
     'statusmatch' => '比赛状态',
     'operation' => '操作',
     'totime' => '时间',

+ 2 - 2
resources/lang/zh-cn/sportsbk.php

@@ -33,8 +33,8 @@ return array(
 	'name_chinese' => '联赛',
 	'status' => '比赛状态',
 	'select_status' => '请选择比赛状态',
-	'dsnum' => '单式单',
-	'csnum' => '串式单',
+	'dsnum' => '单式',
+	'csnum' => '单式注单数',
 	'sectionone_two' =>'第一/二节(主/客)',
 	'sectiontwo' => '第二节',
 	'sectionthere_four' => '第三/四节(主/客)',

+ 2 - 2
resources/lang/zh-cn/sportswq.php

@@ -25,8 +25,8 @@ return array(
     'u_guest_score' => '上半场-客队进球数',
     'source' => '数据来源',
     'newtime' => '联赛',
-    'dsnum' => '单式注单',
-    'csnum' => '串式注单',
+    'dsnum' => '单式注单',
+    'csnum' => '串式注单',
     'statusmatch' => '比赛状态',
     'operation' => '操作',
     'start_time' => '时间',

+ 2 - 2
resources/views/admin/Sportsbq/outcome.blade.php

@@ -30,11 +30,11 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=bq&match_id=@{{d.match_id}}&game_code=bq"> 单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=bq&match_id=@{{d.match_id}}&game_code=bq"> @{{ d.numsim}}</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=bq"> 串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=bq"> @{{ d.numstr}}</a></span>
     </script>
 
     <script type="text/html" id="statusmatch">

+ 2 - 2
resources/views/admin/Sportswq/outcome.blade.php

@@ -22,11 +22,11 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=wq&match_id=@{{d.match_id}}&game_code=wq">单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=wq&match_id=@{{d.match_id}}&game_code=wq">@{{ d.numsim}}</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=wq">串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=wq">@{{ d.numstr}}</a></span>
     </script>
 
     <script type="text/html" id="statusmatch">

+ 2 - 2
resources/views/admin/sportsbk/outcome.blade.php

@@ -131,11 +131,11 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=lq&match_id=@{{d.match_id}}&game_code=lq"> 单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=lq&match_id=@{{d.match_id}}&game_code=lq"> @{{ d.numsim}}</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=lq"> 串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=lq"> @{{ d.numstr}}</a></span>
     </script>
 
     <script type="text/html" id="matchstatus">

+ 12 - 12
resources/views/admin/sportsfoot/outcome.blade.php

@@ -20,17 +20,17 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=zq&match_id=@{{d.match_id}}&game_code=zq"> 单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=zq&match_id=@{{d.match_id}}&game_code=zq"> <!--单式-->@{{ d.numsim}}</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=zq"> 串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=zq"> <!--串式-->@{{ d.numstr}}</a></span>
     </script>
 
     <script type="text/html" id="status">
             {{--<button onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm set">赛事结果</button>--}}
             <a href="javascript:;" onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm">赛事结果</a>
-            <a href="/admin/sportsfoot/addwarn?match_id=@{{d.match_id}}" class="layui-btn layui-btn-sm ">危险球</a>
+            {{--<a href="/admin/sportsfoot/addwarn?match_id=@{{d.match_id}}" class="layui-btn layui-btn-sm ">危险球</a>--}}
 
             @{{#if(d.status==2 || d.status==3){ }}
                 @{{#if(d.status==2){ }}
@@ -455,19 +455,19 @@
                                 '</tr>' +
                                 '<tr>' +
                                 '<td>首进球时间</td>' +
-                                '<td>最终获胜球队</td>' +
-                                '<td>最先进球球队</td>' +
-                                '<td>首球进球方式</td>' +
-                                '<td>最后进球球队</td>' +
+//                                '<td>最终获胜球队</td>' +
+//                                '<td>最先进球球队</td>' +
+//                                '<td>首球进球方式</td>' +
+//                                '<td>最后进球球队</td>' +
                                 '<td>上半场部分</td>' +
                                 '<td>全场比分</td>' +
                                 '</tr>' +
                                 '<tr>' +
                                 '<td>'+info['first_score']['scoretime']+'</td>' +
-                                '<td>'+info['match_winer']+'</td>' +
-                                '<td>'+info['first_score']['teamscore']+'</td>' +
-                                '<td>'+info['first_score']['scoretype']+'</td>' +
-                                '<td>'+info['match_winer']+'</td>' +
+//                                '<td>'+info['match_winer']+'</td>' +
+//                                '<td>'+info['first_score']['teamscore']+'</td>' +
+//                                '<td>'+info['first_score']['scoretype']+'</td>' +
+//                                '<td>'+info['match_winer']+'</td>' +
                                 '<td>'+info['u_home_score']+' / '+info['u_guest_score']+'</td>' +
                                 '<td>'+info['home_score']+' / '+info['guest_score']+'</td>' +
                                 '</tr>' +
@@ -483,7 +483,7 @@
 
                     resultLogOpen = layer.open({
                         type: 1 //Page层类型
-                        ,area: ['900px', '85%']
+                        ,area: ['900px', '80%']
                         ,title: '<h2>比分记录<h2>'
                         ,shade: 0.6 //遮罩透明度
                         ,maxmin: true //允许全屏最小化