彭俊 6 vuotta sitten
vanhempi
commit
ea3e2f2c84

+ 0 - 29
app/Http/Controllers/Admin/SportsbkController.php

@@ -115,11 +115,6 @@ class SportsbkController extends Controller {
 				'guest' => strlen($req->guestn)?$req->guestn:'',
 			),
 		);
-//		$array = array();
-//		foreach($data as $key){
-//			$array[] = $key['home'];
-//			$array[] = $key['guest'];
-//		}
 
 		//修改蓝球比分前的比分数据
 		$res = \App\Models\Stlqresult::where('match_id', $match_id)->first();
@@ -151,33 +146,11 @@ class SportsbkController extends Controller {
 			//赛事下注单作废 处理
 			commonFunction::HandleInvalid($data,$match_id,$match_status,'lq',$process);
 
-//			$guestscore =array(
-//				'1' => $data[1]['guest'],//第一节客队比分
-//				'2' => $data[2]['guest'],//第二节客队比分
-//				'3' => $data[3]['guest'],//第三节客队比分
-//				'4' => $data[4]['guest'],//第四节客队比分
-//			);
-//			$homescore =array(
-//				'1' => $data[1]['home'],//第一节客队比分
-//				'2' => $data[2]['home'],//第二节客队比分
-//				'3' => $data[3]['home'],//第三节客队比分
-//				'4' => $data[4]['home'],//第四节客队比分
-//			);
 			$updatainfo = [
-//				"home_score"=>json_encode($homescore),
-//				"guest_score"=>json_encode($guestscore),
 				"inning"=>json_encode($data),
 				"manual_result"=>json_encode($data),
-//				"u_home_score"=>$data[5]['home'],
-//				"u_guest_score"=>$data[5]['guest'],
-//				"s_home_score"=>$data[6]['home'],
-//				"s_guest_score"=>$data[6]['guest'],
-//				"match_score"=>$data['all']['home'].':'.$data['all']['guest'],
 				'is_correct'=>1
 			];
-			if(strlen($data['all']['home'])>0 && strlen($data['all']['guest'])>0){
-				$updatainfo['match_score'] = $data['all']['home'].':'.$data['all']['guest'];
-			}
 
 			\App\Models\Stlqresult::where('match_id', $match_id)->update($updatainfo);
 
@@ -200,8 +173,6 @@ class SportsbkController extends Controller {
 			if(empty($lastLog) || $lastLog['inning'] != json_encode($data)){
 				\App\Models\Stlqresultlog::insert([
 					'match_id' => $match_id,
-//					'home_score' => json_encode($homescore),
-//					'guest_score' => json_encode($guestscore),
 					'inning' => json_encode($data),
 					'user_id' => session('adminInfo.admin_id'),
 					'type' => 1,

+ 0 - 17
app/Http/Controllers/Admin/SportsbqController.php

@@ -478,10 +478,6 @@ class SportsbqController extends Controller {
 				'guest' => strlen($req->guestl)?$req->guestl:'',
 			),
         );
-//		foreach($uscore as $key){
-//			$data[] = $key['home'];
-//			$data[] = $key['guest'];
-//		}
 
 		//修改棒球比分前的比分数据
 		$res = \App\Models\Stbqresult::where('match_id', $match_id)->first();
@@ -528,23 +524,10 @@ class SportsbqController extends Controller {
 			commonFunction::HandleInvalid($uscore,$match_id,$match_status,'bq',$process);
 
 			$updatainfo = [
-//				"home_score"=>$uscore['all']['home'],
-//				"guest_score"=>$uscore['all']['guest'],
 				"match_score_t"=>json_encode($uscore),
 				"manual_result"=>json_encode($uscore),
-//				"match_score"=>$uscore['all']['home'].':'.$uscore['all']['guest'],
-//				"u_home_score"=>$uscore['five']['home'],
-//				"u_guest_score"=>$uscore['five']['guest'],
 				'is_correct'=>1,
 			];
-			if(strlen($uscore['all']['home'])>0 && strlen($uscore['all']['guest'])>0){
-				$updatainfo['home_score'] = $uscore['all']['home'];
-				$updatainfo['guest_score'] = $uscore['all']['guest'];
-			}
-			if(strlen($uscore['five']['home'])>0 && strlen($uscore['five']['guest'])>0){
-				$updatainfo['u_home_score'] = $uscore['all']['home'];
-				$updatainfo['u_guest_score'] = $uscore['all']['guest'];
-			}
 
 			\App\Models\Stbqresult::where('match_id', $match_id)->update($updatainfo);
 

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

@@ -670,10 +670,6 @@ class SportsfootController extends Controller {
 				'guest' => strlen($req->guestall)>0?$req->guestall:'',
 			),
 		);
-//		foreach($data as $key){
-//			$array[] = $key['home'];
-//			$array[] = $key['guest'];
-//		}
 
 		//修改足球比分前的比分数据
 		$res = \App\Models\Stzqresult::where('match_id', $match_id)->first();
@@ -718,51 +714,15 @@ class SportsfootController extends Controller {
 		if($scores['half']['home'] != $data['half']['home'] || $scores['half']['guest'] != $data['half']['guest']){
 			$process[] = 'half';
 		}
-		//print_r($process);exit;
 
 		if(!empty($process)){
 			//赛事下注单作废 处理
 			commonFunction::HandleInvalid($data,$match_id,$match_status,'zq',$process);
 
-			$penaltycard = array(
-				'home'=>intval($req->homeallcard)?intval($req->homeallcard):0,
-				'guest'=>intval($req->guestallcard)?intval($req->guestallcard):0,
-				'home_half'=>intval($req->homehalfcard)?intval($req->homehalfcard):0,
-				'guest_half'=>intval($req->guesthalfcard)?intval($req->guesthalfcard):0,
-			);
-			$cornerball = array(
-				'home'=>intval($req->homeallcorner)?intval($req->homeallcorner):0,
-				'guest'=>intval($req->guestallcorner)?intval($req->guestallcorner):0,
-				'home_half'=>intval($req->homehalfcorner)?intval($req->homehalfcorner):0,
-				'guest_half'=>intval($req->guesthalfcorner)?intval($req->guesthalfcorner):0,
-			);
-			$firstone = array(
-				'teamscore'=>$req->firstscore ? $req->firstscore:0,
-				'scoretime'=>intval($req->onescoretime)?intval($req->onescoretime):0,
-				'scoretype'=>$req->firststye ? $req->firststye:0,
-			);
-//			$model->match_score = $data['all']['home'].':'.$data['all']['guest'];
-//			$model->u_home_score = $data['half']['home'];
-//			$model->u_guest_score = $data['half']['guest'];
-//			$model->home_score = $data['all']['home'];
-//			$model->guest_score = $data['all']['guest'];
-//			$model->last_score = $req->lastscore?$req->lastscore:'';
-//			$model->match_winer = $req->matchwiner?$req->matchwiner:'';
-//			$model->penalty_card = json_encode($penaltycard,JSON_UNESCAPED_UNICODE);
-//			$model->corner_ball = json_encode($cornerball,JSON_UNESCAPED_UNICODE);
-//			$model->first_score = json_encode($firstone,JSON_UNESCAPED_UNICODE);
-//			$model->is_correct = 1;
-//			$model->manual_result = json_encode($data,JSON_UNESCAPED_UNICODE);
-//			$model->save();
 			$updatainfo = [
 				"manual_result"=>json_encode($data,JSON_UNESCAPED_UNICODE),
 				'is_correct'=>1
 			];
-			if(strlen($data['all']['home'])>0 && strlen($data['all']['guest'])>0){
-//				$updatainfo['match_score'] = $data['all']['home'].':'.$data['all']['guest'];
-				$updatainfo['home_score'] = $data['all']['home'];
-				$updatainfo['guest_score'] = $data['all']['guest'];
-			}
 
 			\App\Models\Stzqresult::where('match_id', $match_id)->update($updatainfo);
 
@@ -784,8 +744,6 @@ class SportsfootController extends Controller {
 			if(empty($lastLog) || $lastLog['manual_result'] != json_encode($data)){
 				\App\Models\Stzqresultlog::insert([
 					'match_id' => $match_id,
-//					'home_score' => json_encode($homescore),
-//					'guest_score' => json_encode($guestscore),
 					'manual_result' => json_encode($data),
 					'user_id' => session('adminInfo.admin_id'),
 					'type' => 1,

+ 1 - 15
app/Http/Controllers/Admin/SportswqController.php

@@ -436,11 +436,6 @@ class SportswqController extends Controller {
 			),
 		);
 
-//		foreach($data as $key){
-//			$array[] = $key['home'];
-//			$array[] = $key['guest'];
-//		}
-
 		//修改网球比分前的比分数据
 		$res = \App\Models\Stwqresult::where('match_id', $match_id)->first();
 		$scores = json_decode($res['manual_result'],true);
@@ -466,21 +461,12 @@ class SportswqController extends Controller {
 		if(!empty($process)){
 			//赛事下注单作废 处理
 			commonFunction::HandleInvalid($data,$match_id,$match_status,'wq',$process);
+
 			$updatainfo = [
-//			"home_player_score"=>$data['all']['home'],
-//			"guest_player_score"=>$data['all']['guest'],
 				"inning"=>json_encode($data),
 				"manual_result"=>json_encode($data),
-//			"match_score"=>$data['all']['home'].':'.$data['all']['guest'],
-//			"first_inning_score"=>$data[1]['home'].':'.$data[1]['guest'],
-//			"second_inning_score"=>$data[2]['home'].':'.$data[2]['guest'],
-//			"third_inning_score"=>$data[3]['home'].':'.$data[3]['guest'],
 				'is_correct'=>1
 			];
-			if(strlen($data['all']['home'])>0 && strlen($data['all']['guest'])>0){
-				$updatainfo['home_player_score'] = $data['all']['home'];
-				$updatainfo['guest_player_score'] = $data['all']['guest'];
-			}
 
 			\App\Models\Stwqresult::where('match_id', $match_id)->update($updatainfo);
 

+ 6 - 4
app/Models/Stbqresult.php

@@ -20,15 +20,15 @@ class Stbqresult extends BaseModel {
 
         if($if_order == 1){
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->wherein('st_bq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_bq_league.name_chinese as saisname')->orderby('st_bq_result.id','desc')->where($where)->wherein('st_bq_competition.id',$match_ids)->paginate ($list);
             } 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')->wherein('st_bq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_bq_league.name_chinese as saisname')->orderby('st_bq_result.id','desc')->wherein('st_bq_competition.id',$match_ids)->paginate ($list);
             }
         }else{
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->paginate ($list);
+                $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',$this->table.'.manual_result','st_bq_league.name_chinese as saisname')->orderby('st_bq_result.id','desc')->where($where)->paginate ($list);
             } 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);
+                $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',$this->table.'.manual_result','st_bq_league.name_chinese as saisname')->orderby('st_bq_result.id','desc')->paginate ($list);
             }
         }
 
@@ -52,6 +52,8 @@ class Stbqresult extends BaseModel {
                 }
             }
 
+            $data[$i]->manual_result = json_decode($data[$i]->manual_result,true);
+
         }
 
         return $data->toArray ();

+ 6 - 4
app/Models/Stlqresult.php

@@ -17,15 +17,15 @@ class Stlqresult extends BaseModel
 
         if($if_order == 1){
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->wherein('st_lq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_lq_league.name_chinese')->orderby($this->table.'.id','desc')->where($where)->wherein('st_lq_competition.id',$match_ids)->paginate ($list);
             } else {
-                $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')->wherein('st_lq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_lq_league.name_chinese')->orderby($this->table.'.id','desc')->wherein('st_lq_competition.id',$match_ids)->paginate ($list);
             }
         }else{
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->paginate ($list);
+                $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',$this->table.'.manual_result','st_lq_league.name_chinese')->orderby($this->table.'.id','desc')->where($where)->paginate ($list);
             } else {
-                $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);
+                $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',$this->table.'.manual_result','st_lq_league.name_chinese')->orderby($this->table.'.id','desc')->paginate ($list);
             }
         }
 
@@ -49,6 +49,8 @@ class Stlqresult extends BaseModel
                 }
             }
 
+            $data[$i]->manual_result = json_decode($data[$i]->manual_result,true);
+
         }
 
         return $data->toArray ();

+ 6 - 4
app/Models/Stwqresult.php

@@ -18,15 +18,15 @@ class Stwqresult extends Model
 
         if($if_order == 1){
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->wherein('st_wq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->where($where)->wherein('st_wq_competition.id',$match_ids)->paginate ($list);
             } else {
-                $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')->wherein('st_wq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->wherein('st_wq_competition.id',$match_ids)->paginate ($list);
             }
         }else{
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->paginate ($list);
+                $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',$this->table.'.manual_result','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->where($where)->paginate ($list);
             } else {
-                $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);
+                $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',$this->table.'.manual_result','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->paginate ($list);
             }
         }
 
@@ -50,6 +50,8 @@ class Stwqresult extends Model
                 }
             }
 
+            $data[$i]->manual_result = json_decode($data[$i]->manual_result,true);
+
         }
 
         return $data->toArray (); 

+ 6 - 4
app/Models/Stzqresult.php

@@ -17,15 +17,15 @@ class Stzqresult extends BaseModel
         //print_r($match_ids);exit;
         if($if_order == 1){
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->wherein('st_zq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_zq_league.name_chinese as saisname')->orderby('st_zq_result.match_id','desc')->where($where)->wherein('st_zq_competition.id',$match_ids)->paginate ($list);
             } 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')->whereIn('st_zq_competition.id',$match_ids)->paginate ($list);
+                $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',$this->table.'.manual_result','st_zq_league.name_chinese as saisname')->orderby('st_zq_result.match_id','desc')->whereIn('st_zq_competition.id',$match_ids)->paginate ($list);
             }
         }else{
             if (is_array ($where) && count ($where) > 0) {
-                $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')->where($where)->paginate ($list);
+                $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',$this->table.'.manual_result','st_zq_league.name_chinese as saisname')->orderby('st_zq_result.match_id','desc')->where($where)->paginate ($list);
             } 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);
+                $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',$this->table.'.manual_result','st_zq_league.name_chinese as saisname')->orderby('st_zq_result.match_id','desc')->paginate ($list);
             }
         }
 
@@ -51,6 +51,8 @@ class Stzqresult extends BaseModel
                 }
             }
 
+            $data[$i]->manual_result = json_decode($data[$i]->manual_result,true);
+
         }
 
         return $data->toArray ();

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

@@ -22,8 +22,8 @@
         <!--
             <input type="text" style="width:30px;heigth:20px" id="u_home_score@{{d.match_id}}" name="u_home_score" value="@{{d.u_home_score}}"> 
             <input type="text" style="width:30px;heigth:20px" id="u_guest_score@{{d.match_id}}" name="u_guest_score" value="@{{d.u_guest_score}}"> / -->
-            <input type="text" style="width:30px;heigth:20px" id="home_score@{{d.match_id}}" name="home_score" value="@{{d.home_score}}" readonly="readonly">
-            <input type="text" style="width:30px;heigth:20px" id="guest_score@{{d.match_id}}" name="guest_score" value="@{{d.guest_score}}" readonly="readonly">
+            <input type="text" style="width:30px;heigth:20px" id="home_score@{{d.match_id}}" name="home_score" value="@{{d.manual_result.all.home}}" readonly="readonly">
+            <input type="text" style="width:30px;heigth:20px" id="guest_score@{{d.match_id}}" name="guest_score" value="@{{d.manual_result.all.guest}}" readonly="readonly">
             <input type="hidden" style="width:30px;heigth:20px" id="match_status@{{d.match_id}}" name="guest_score" value="@{{d.status}}">
         <!--
             <button class="layui-icon" onclick="teamscore(@{{d.match_id}})"><h6>提交</h6></button> -->
@@ -63,8 +63,8 @@
 
     <script type="text/html" id="operation">
         <a href="javascript:;" onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm">赛事结果</a>
-        @{{#if(d.status==1 || d.status==2 || d.status==3){ }}
-            @{{#if(d.status==1 || d.status==2){ }}
+        @{{#if(d.status==0 || d.status==1 || d.status==2 || d.status==3){ }}
+            @{{#if(d.status==0 || d.status==1 || d.status==2){ }}
                 {{--<a href="javascript:;" onclick="settlement(@{{d.match_id}},'bq')" class="layui-btn layui-btn-sm">结算</a>--}}
         <a href="javascript:;" onclick="settleopen(@{{d.match_id}},'bq')" class="layui-btn layui-btn-sm">结算</a>
             @{{#} }}

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

@@ -14,8 +14,8 @@
     </script>
 
     <script type="text/html" id="matchscore"> 
-            <input type="text" style="width:30px;heigth:20px" id="home_player_score@{{d.match_id}}" name="home_player_score" value="@{{d.home_player_score}}" readonly="readonly">
-            <input type="text" style="width:30px;heigth:20px" id="guest_player_score@{{d.match_id}}" name="guest_player_score" value="@{{d.guest_player_score}}" readonly="readonly">
+            <input type="text" style="width:30px;heigth:20px" id="home_player_score@{{d.match_id}}" name="home_player_score" value="@{{d.manual_result.all.home}}" readonly="readonly">
+            <input type="text" style="width:30px;heigth:20px" id="guest_player_score@{{d.match_id}}" name="guest_player_score" value="@{{d.manual_result.all.guest}}" readonly="readonly">
             <input type="hidden" style="width:30px;heigth:20px" id="match_status@{{d.match_id}}" name="guest_score" value="@{{d.status}}">
             <!--
             <button class="layui-icon" onclick="inputscore(@{{d.match_id}})"><h6>提交</h6></button>-->
@@ -55,8 +55,8 @@
 
     <script type="text/html" id="operation">
         <a href="javascript:;" onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm">赛事结果</a>
-        @{{#if(d.status==1 || d.status==2 || d.status==3){ }}
-            @{{#if(d.status==1 || d.status==2){ }}
+        @{{#if(d.status==0 || d.status==1 || d.status==2 || d.status==3){ }}
+            @{{#if(d.status==0 || d.status==1 || d.status==2){ }}
                 {{--<a href="javascript:;" onclick="settlement(@{{d.match_id}},'wq')" class="layui-btn layui-btn-sm">结算</a>--}}
         <a href="javascript:;" onclick="settleopen(@{{d.match_id}},'wq')" class="layui-btn layui-btn-sm">结算</a>
             @{{#} }}

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

@@ -165,8 +165,8 @@
     <script type="text/html" id="operation">
         
          <button onclick="addResult(@{{d.match_id}})" class="layui-btn layui-btn-sm set">赛事结果</button>
-        @{{#if(d.status==1 || d.status==2 || d.status==3){ }}
-            @{{#if(d.status==1 || d.status==2){ }}
+        @{{#if(d.status==0 || d.status==1 || d.status==2 || d.status==3){ }}
+            @{{#if(d.status==0 || d.status==1 || d.status==2){ }}
                 {{--<a href="javascript:;" onclick="lqsettlement(@{{d.match_id}},'lq')" class="layui-btn layui-btn-sm">结算</a>--}}
          <a href="javascript:;" onclick="settleopen(@{{d.match_id}},'lq')" class="layui-btn layui-btn-sm">结算</a>
 
@@ -188,8 +188,8 @@
     </script>
 
     <script type="text/html" id="match_score">
-        <input type="text" style="width:30px;heigth:20px" id="ozteamscore@{{d.match_id}}" name="ozteamscore" value="@{{d.home_scores}}" readonly="readonly">
-        <input type="text" style="width:30px;heigth:20px" id="okteamscore@{{d.match_id}}" name="okteamscore" value="@{{d.guest_scores}}" readonly="readonly">
+        <input type="text" style="width:30px;heigth:20px" id="ozteamscore@{{d.match_id}}" name="ozteamscore" value="@{{d.manual_result.all.home}}" readonly="readonly">
+        <input type="text" style="width:30px;heigth:20px" id="okteamscore@{{d.match_id}}" name="okteamscore" value="@{{d.manual_result.all.guest}}" readonly="readonly">
     </script>
     
     <script type="text/html" id="sectionone_two">

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

@@ -32,8 +32,8 @@
             <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>--}}
 
-            @{{#if(d.status==1 || d.status==2 || d.status==3){ }}
-                @{{#if(d.status==1 || d.status==2){ }}
+            @{{#if(d.status==0 || d.status==1 || d.status==2 || d.status==3){ }}
+                @{{#if(d.status==0 || d.status==1 || d.status==2){ }}
                     {{--<a href="javascript:;" onclick="settlement(@{{d.match_id}},'zq')" class="layui-btn layui-btn-sm">结算</a>--}}
             <a href="javascript:;" onclick="settleopen(@{{d.match_id}},'zq')" class="layui-btn layui-btn-sm">结算</a>
                 @{{#} }}
@@ -81,8 +81,8 @@
     </script>
 
     <script type="text/html" id="match_score">
-        <input type="text" style="width:30px;heigth:20px" id="home_score@{{d.match_id}}" name="home_score" value="@{{d.home_score}}" readonly="readonly">
-        <input type="text" style="width:30px;heigth:20px" id="guest_score@{{d.match_id}}" name="guest_score" value="@{{d.guest_score}}" readonly="readonly">
+        <input type="text" style="width:30px;heigth:20px" id="home_score@{{d.match_id}}" name="home_score" value="@{{d.manual_result.all.home}}" readonly="readonly">
+        <input type="text" style="width:30px;heigth:20px" id="guest_score@{{d.match_id}}" name="guest_score" value="@{{d.manual_result.all.guest}}" readonly="readonly">
     </script>
 
     <script type="text/html" id="sxalfcourt">