彭俊 6 سال پیش
والد
کامیت
9479cd4d8e

+ 3 - 0
app/Http/Controllers/Admin/SportsBaseController.php

@@ -251,6 +251,7 @@ class SportsBaseController extends Controller {
             }
             //查看赛事是否有下注细信息
             $res = \App\Models\MoneyBuyMatch::where('match_id', $data->match_id)->get()->toArray();
+            /*
             if(!empty($res)){
                 if($data->status == 0){
                     $match_status =array(['status'=>0,'name'=>'未开始'],['status'=>1,'name'=>'正在进行'],['status'=>4,'name'=>'作废']);
@@ -281,6 +282,8 @@ class SportsBaseController extends Controller {
             if($data->status == 6){
                 $match_status =array(['status'=>6,'name'=>'取消']);
             }
+            */
+            $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'],['status' => 2, 'name' => '已结束'], ['status' => 6, 'name' => '取消']);
 
             // $name_chinese = \App\Models\BaseLeague::where('id', $data->lg_id)->first();
             // $data->name_chinese = $name_chinese->name_chinese;

+ 3 - 0
app/Http/Controllers/Admin/SportsBasketController.php

@@ -250,6 +250,7 @@ class SportsBasketController extends Controller {
 			}
 			//查看赛事是否有下注细信息
 			$res = \App\Models\MoneyBuyMatch::where('match_id', $data->match_id)->get()->toArray();
+			/*
 			if(!empty($res)){
 				if($data->status == 0){
 					$match_status =array(['status'=>0,'name'=>'未开始'],['status'=>1,'name'=>'正在进行'],['status'=>4,'name'=>'作废']);
@@ -280,6 +281,8 @@ class SportsBasketController extends Controller {
 			if($data->status == 6){
 				$match_status =array(['status'=>6,'name'=>'取消']);
 			}
+			*/
+            $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'],['status' => 2, 'name' => '已结束'], ['status' => 6, 'name' => '取消']);
 
 			$name_chinese = \App\Models\BasketLeague::where('id', $data->lg_id)->first();
 			$data->name_chinese = $name_chinese->name_chinese;

+ 8 - 3
app/Http/Controllers/Admin/SportsSoccerController.php

@@ -267,6 +267,7 @@ class SportsSoccerController extends Controller
 
             //查看赛事是否有下注细信息
             $res = \App\Models\MoneyBuyMatch::where('match_id', $id)->get()->toArray();
+            /*
             if (!empty($res)) {
                 if ($data->status == 0) {//有注单的未开始赛事
                     $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 4, 'name' => '作废']);
@@ -276,17 +277,17 @@ class SportsSoccerController extends Controller
                 }
             } else {
                 if ($data->status == 0) {//无注单的未开始赛事
-                    $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 6, 'name' => '取消']);
+                    $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 6, 'name' => '取消'],['status' => 4, 'name' => '作废']);
                 }
                 if ($data->status == 1) {//无注单的已开始赛事
-                    $match_status = array(['status' => 1, 'name' => '正在进行'], ['status' => 2, 'name' => '已结束'], ['status' => 4, 'name' => '作废'], ['status' => 6, 'name' => '取消']);
+                    $match_status = array(['status' => 1, 'name' => '正在进行'], ['status' => 2, 'name' => '已结束'], ['status' => 6, 'name' => '取消'],['status' => 4, 'name' => '作废']);
                 }
             }
             if ($data->status == 2) {//已结束
                 $match_status = array(['status' => 2, 'name' => '已结束'], ['status' => 4, 'name' => '作废']);
             }
             if ($data->status == 3) {//已结算
-                $match_status = array(['status' => 3, 'name' => '已结算'], ['status' => 5, 'name' => '待结算']);
+                $match_status = array(['status' => 3, 'name' => '已结算'],['status' => 5, 'name' => '待结算'], ['status' => 4, 'name' => '作废']);
             }
             if ($data->status == 4) {//已作废
                 $match_status = array(['status' => 4, 'name' => '作废'], ['status' => 6, 'name' => '取消']);
@@ -297,6 +298,9 @@ class SportsSoccerController extends Controller
             if ($data->status == 6) {//已取消
                 $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 2, 'name' => '已结束'],['status' => 6, 'name' => '取消']);
             }
+            */
+
+            $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'],['status' => 2, 'name' => '已结束'], ['status' => 6, 'name' => '取消']);
 
             $name_chinese = \App\Models\SoccerLeague::where('id', $data->lg_id)->first();
             $data->name_chinese = $name_chinese->name_chinese;
@@ -332,6 +336,7 @@ class SportsSoccerController extends Controller
             $model->match_date = $req->input('match_date');
             $model->match_time = $req->input('match_time');
             $model->status = $req->input('status');
+
             if ($req->input('is_rollball') == true) {
                 $model->is_rollball = 1;
             } else {

+ 3 - 0
app/Http/Controllers/Admin/SportsTennisController.php

@@ -250,6 +250,7 @@ class SportsTennisController extends Controller {
 
             //查看赛事是否有下注细信息
             $res = \App\Models\MoneyBuyMatch::where('match_id', $data->match_id)->get()->toArray();
+            /*
             if(!empty($res)){
                 if($data->status == 0){
                     $match_status =array(['status'=>0,'name'=>'未开始'],['status'=>1,'name'=>'正在进行'],['status'=>4,'name'=>'作废']);
@@ -280,6 +281,8 @@ class SportsTennisController extends Controller {
             if($data->status == 6){
                 $match_status =array(['status'=>6,'name'=>'取消']);
             }
+            */
+            $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'],['status' => 2, 'name' => '已结束'], ['status' => 6, 'name' => '取消']);
 
             $name_chinese = \App\Models\TennisLeague::where('id', $data->lg_id)->first();
             $data->name_chinese = $name_chinese->name_chinese;

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

@@ -622,6 +622,7 @@ class SportsfootController extends Controller {
 		}else{
 			$match_id = $req->match_id;//赛事id
 			$model = \App\Models\Stzqresult::where('match_id', $match_id)->first();
+
 			$model->status = 4;
 			$model->save();
 

+ 1 - 1
app/Models/SportsNoteList.php

@@ -884,7 +884,7 @@ class SportsNoteList extends BaseModel
         //该赛事的单式注单
         $account_identitys = array();
         $order_ids = array();
-        $orders = $this->where('match_id',$matchid)->get();
+        $orders = $this->where(['match_id'=>$matchid,'game_code'=>$type])->get();
         if(!empty($orders)){
             for ($c=0; $c < count($orders); $c++){
                 $account_identitys[] = $orders[$c]['account_identitys'];