|
|
@@ -257,6 +257,47 @@ class SportsbkController extends Controller {
|
|
|
$process = array();
|
|
|
}
|
|
|
|
|
|
+ //赛事比分数据
|
|
|
+ $res = \App\Models\Stlqresult::where('match_id', $match_id)->first();
|
|
|
+ $scores = json_decode($res['manual_result'],true);
|
|
|
+
|
|
|
+ //结算验证
|
|
|
+ if(in_array('one',$process)){
|
|
|
+ if(strlen($scores['1']['home'])==0 || strlen($scores['1']['guest'])==0){
|
|
|
+ return json_encode(['status'=>6,'msg'=>'没有第一节结果,无法结算第一节']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('two',$process)){
|
|
|
+ if(strlen($scores['2']['home'])==0 || strlen($scores['2']['guest'])==0){
|
|
|
+ return json_encode(['status'=>7,'msg'=>'没有第二节结果,无法结算第二节']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('three',$process)){
|
|
|
+ if(strlen($scores['3']['home'])==0 || strlen($scores['3']['guest'])==0){
|
|
|
+ return json_encode(['status'=>8,'msg'=>'没有第三节结果,无法结算第三节']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('four',$process)){
|
|
|
+ if(strlen($scores['4']['home'])==0 || strlen($scores['4']['guest'])==0){
|
|
|
+ return json_encode(['status'=>9,'msg'=>'没有第四节结果,无法结算第四节']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('uhalf',$process)){
|
|
|
+ if(strlen($scores['5']['home'])==0 || strlen($scores['5']['guest'])==0){
|
|
|
+ return json_encode(['status'=>10,'msg'=>'没有上半场角球结果,无法结算上半场']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('dhalf',$process)){
|
|
|
+ if(strlen($scores['6']['home'])==0 || strlen($scores['6']['guest'])==0){
|
|
|
+ return json_encode(['status'=>11,'msg'=>'没有下半场比分结果,无法结算下半场']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(in_array('all',$process)){
|
|
|
+ if(strlen($scores['all']['home'])==0 || strlen($scores['all']['guest'])==0){
|
|
|
+ return json_encode(['status'=>12,'msg'=>'没有全场比分结果,无法结算全场']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$token = session('adminInfo.token');
|
|
|
$notice = \App\Models\Comendnotice::where('match_id', $match_id)->first();
|
|
|
|