Jonlin 6 years ago
parent
commit
109b30dd1c

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

@@ -320,11 +320,11 @@ class SportsBaseController extends Controller {
         $cp_id = $req->id;
         $request['status'] = isset($req->status) ? trim($req->status) : '-1';
         $request['p_code'] = isset($req->p_code) ? trim($req->p_code) : '-1';
-        $request['id'] = isset($req->id) ? trim($req->id) : null;
-        $newapp = \App\Models\SportsBase::where('match_id',$request['id'])->first();
+        $request['match_id'] = isset($req->match_id) ? trim($req->match_id) : null;
+        $newapp = \App\Models\SportsBase::where('id',$cp_id)->first();
         // $match_id = $newapp->match_id;
         if(empty($newapp)){
-            $match_id = $req->input('id');
+            $match_id = $req->input('match_id');
         }else{
             $match_id = $newapp->match_id;
         }

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

@@ -322,11 +322,11 @@ class SportsBasketController extends Controller {
 		$cp_id = $req->id;
 		$request['status'] = isset($req->status) ? trim($req->status) : '-1';
 		$request['p_code'] = isset($req->p_code) ? trim($req->p_code) : '-1';
-		$request['id'] = isset($req->id) ? trim($req->id) : null;
-		$newapp = \App\Models\SportsBasket::where('match_id',$request['id'])->first();
+		$request['match_id'] = isset($req->match_id) ? trim($req->match_id) : null;
+		$newapp = \App\Models\SportsBasket::where('id',$cp_id)->first();
 		// $match_id = $newapp->match_id;
 		if(empty($newapp)){
-			$match_id = $req->input('id');
+			$match_id = $req->input('match_id');
 		}else{
 			$match_id = $newapp->match_id;
 		}

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

@@ -321,11 +321,11 @@ class SportsTennisController extends Controller {
         $cp_id = $req->id;
         $request['status'] = isset($req->status) ? trim($req->status) : '-1';
         $request['p_code'] = isset($req->p_code) ? trim($req->p_code) : '-1';
-        $request['id'] = isset($req->id) ? trim($req->id) : null;
-        $newapp = \App\Models\SportsTennis::where('match_id',$request['id'])->first();
+        $request['match_id'] = isset($req->match_id) ? trim($req->match_id) : null;
+        $newapp = \App\Models\SportsTennis::where('id',$cp_id)->first();
         // $match_id = $newapp->match_id;
         if(empty($newapp)){
-            $match_id = $req->input('id');
+            $match_id = $req->input('match_id');
         }else{
             $match_id = $newapp->match_id;
         }