|
|
@@ -34,7 +34,6 @@ class SportsfootController extends Controller {
|
|
|
//去重
|
|
|
$simplex_ids = array_unique($simplex_ids);
|
|
|
$str_ids = array_unique($str_ids);
|
|
|
- //print_r($simplex_ids);exit;
|
|
|
|
|
|
//判断赛事下注单输赢
|
|
|
$datas = array('noticeid' => $noticeid , 'token' => $token);
|
|
|
@@ -72,6 +71,7 @@ class SportsfootController extends Controller {
|
|
|
return json_encode(['status'=>1,'msg'=>'单式结算成功,没有串式订单']);
|
|
|
}
|
|
|
}
|
|
|
+ //串式结算
|
|
|
elseif(count($str_ids)>0 && count($simplex_ids)==0){
|
|
|
$str['order_ids'] = implode(',',$str_ids);
|
|
|
$settlestr = $settlementAuto->SubmitSettelement('s',$str);
|
|
|
@@ -81,6 +81,7 @@ class SportsfootController extends Controller {
|
|
|
return json_encode(['status'=>1,'msg'=>'串式结算成功,没有单式订单']);
|
|
|
}
|
|
|
}
|
|
|
+ //既有单式也有串式
|
|
|
elseif(count($str_ids)>0 && count($simplex_ids)>0){
|
|
|
$sim['order_ids'] = implode(',',$simplex_ids);
|
|
|
$str['order_ids'] = implode(',',$str_ids);
|
|
|
@@ -101,56 +102,6 @@ class SportsfootController extends Controller {
|
|
|
$res = \App\Models\SportsSoccer::where ('id', $match_id)->update(['status' =>3]);
|
|
|
return json_encode(['status'=>4,'msg'=>'该赛事没有任何订单,将会结束该赛事!!!']);
|
|
|
}
|
|
|
-
|
|
|
-// if(count($simplex_ids)>0 || count($str_ids)>0){
|
|
|
-// $requet = file_get_contents($jsurl."/WinFail?noticeid=".$noticeid."&token=".$token);
|
|
|
-//
|
|
|
-// if(json_decode($requet,true)['status']==1){
|
|
|
-// $napp = new \App\Models\Stzqresult();
|
|
|
-// //单式结算
|
|
|
-// if(count($simplex_ids)>0 && count($str_ids)==0){
|
|
|
-// $huawei_res = $napp->simplexs($token,$match_id,$jsurl,'zq');
|
|
|
-//
|
|
|
-// if($huawei_res['status']==1){
|
|
|
-// return json_encode(['status'=>1,'msg'=>'单式结算成功,没有串式订单']);
|
|
|
-// }else{
|
|
|
-// return json_encode(['status'=>3,'msg'=>'单式结算有误,请联系管理员!!!('.$huawei_res['msg'].')']);//结算错误
|
|
|
-// }
|
|
|
-// }elseif(count($str_ids)>0 && count($simplex_ids)==0){
|
|
|
-// //串式结算
|
|
|
-// $tandem_res = $napp->tandems($token,$match_id,$jsurl,'zq');
|
|
|
-//
|
|
|
-// if($tandem_res['status']==1){
|
|
|
-// return json_encode(['status'=>1,'msg'=>'串式结算成功,没有单式订单']);
|
|
|
-// }else{
|
|
|
-// return json_encode(['status'=>3,'msg'=>'串式结算有误,请联系管理员!!!('.$tandem_res['msg'].')']);//结算错误
|
|
|
-// }
|
|
|
-// }elseif(count($str_ids)>0 && count($simplex_ids)>0){
|
|
|
-// //既有单式又有串式
|
|
|
-// $huawei_res = $napp->simplexs($token,$match_id,$jsurl,'zq');
|
|
|
-//
|
|
|
-// //串式结算
|
|
|
-// $tandem_res = $napp->tandems($token,$match_id,$jsurl,'zq');
|
|
|
-// if($tandem_res['status']==1 && $huawei_res['status']==1){
|
|
|
-// return json_encode(['status'=>1,'msg'=>'结算成功']);
|
|
|
-// }elseif($tandem_res['status']!=1 || $huawei_res['status']!=1){
|
|
|
-// return json_encode(['status'=>3,'msg'=>'结算有误,请联系管理员!!!('.$tandem_res['msg'].$huawei_res['msg'].')']);
|
|
|
-// }else{
|
|
|
-// return json_encode(['status'=>3,'msg'=>'返回参数不对']);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }else{
|
|
|
-// return json_encode(['status'=>2,'msg'=>'判断输赢错误,请联系管理员!!!']);;//输赢错误
|
|
|
-// }
|
|
|
-// }else{
|
|
|
-// $log = array(
|
|
|
-// session('adminInfo.admin_name'),
|
|
|
-// );
|
|
|
-// OperationLog(session('adminInfo.admin_id'), '足球结算', $log);
|
|
|
-// $res = \App\Models\Stzqresult::where ('match_id', $match_id)->update(['status' =>3]);
|
|
|
-// $res = \App\Models\SportsSoccer::where ('match_id', $match_id)->update(['status' =>3]);
|
|
|
-// return json_encode(['status'=>4,'msg'=>'该赛事没有任何订单,将会结束该赛事!!!']);
|
|
|
-// }
|
|
|
|
|
|
}
|
|
|
|