|
@@ -17,6 +17,7 @@ class SportsfootController extends Controller {
|
|
|
|
|
|
|
|
function Settlement1(Req $req){
|
|
function Settlement1(Req $req){
|
|
|
$match_id = $req->match_id;
|
|
$match_id = $req->match_id;
|
|
|
|
|
+ $match = \App\Models\SportsSoccer::where ('id', $match_id)->first();
|
|
|
$type = $req->type;
|
|
$type = $req->type;
|
|
|
$process = $req->process;
|
|
$process = $req->process;
|
|
|
if(empty($process)){
|
|
if(empty($process)){
|
|
@@ -80,6 +81,11 @@ class SportsfootController extends Controller {
|
|
|
if($winfail == false){
|
|
if($winfail == false){
|
|
|
return json_encode(['status'=>2,'msg'=>'判断输赢错误,请联系管理员!!!']);//输赢错误
|
|
return json_encode(['status'=>2,'msg'=>'判断输赢错误,请联系管理员!!!']);//输赢错误
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ $change_status = 1;
|
|
|
|
|
+ if($match['status'] == 0 || $match['status'] == 1){
|
|
|
|
|
+ $change_status = 0;
|
|
|
|
|
+ }
|
|
|
$sim = array(
|
|
$sim = array(
|
|
|
'token'=>$token,
|
|
'token'=>$token,
|
|
|
'order_ids'=>'', //订单id字符串,用半角都好分隔
|
|
'order_ids'=>'', //订单id字符串,用半角都好分隔
|
|
@@ -87,7 +93,7 @@ class SportsfootController extends Controller {
|
|
|
'settype'=>2, //结算次数 1首次 2非首次
|
|
'settype'=>2, //结算次数 1首次 2非首次
|
|
|
'game_code'=>$type, //赛事类型 zq lq wq bq
|
|
'game_code'=>$type, //赛事类型 zq lq wq bq
|
|
|
'match_id'=>$match_id, // 赛事ID
|
|
'match_id'=>$match_id, // 赛事ID
|
|
|
- 'change_status'=>1 //是否改状态
|
|
|
|
|
|
|
+ 'change_status'=>$change_status //是否改状态
|
|
|
);
|
|
);
|
|
|
$str = array(
|
|
$str = array(
|
|
|
'token'=>$token,
|
|
'token'=>$token,
|
|
@@ -96,7 +102,7 @@ class SportsfootController extends Controller {
|
|
|
'settype'=>2, //结算次数 1首次 2非首次
|
|
'settype'=>2, //结算次数 1首次 2非首次
|
|
|
'game_code'=>$type, //赛事类型 zq lq wq bq
|
|
'game_code'=>$type, //赛事类型 zq lq wq bq
|
|
|
'match_id'=>$match_id, // 赛事ID
|
|
'match_id'=>$match_id, // 赛事ID
|
|
|
- 'change_status'=>1 //是否改状态
|
|
|
|
|
|
|
+ 'change_status'=>$change_status //是否改状态
|
|
|
);
|
|
);
|
|
|
if(count($simplex_ids)>0 || count($str_ids)>0){
|
|
if(count($simplex_ids)>0 || count($str_ids)>0){
|
|
|
//单式结算
|
|
//单式结算
|
|
@@ -136,8 +142,7 @@ class SportsfootController extends Controller {
|
|
|
session('adminInfo.admin_name'),
|
|
session('adminInfo.admin_name'),
|
|
|
);
|
|
);
|
|
|
OperationLog(session('adminInfo.admin_id'), '足球结算', $log);
|
|
OperationLog(session('adminInfo.admin_id'), '足球结算', $log);
|
|
|
- $res = \App\Models\SportsSoccer::where ('id', $match_id)->first();
|
|
|
|
|
- if($res['status'] == 1){
|
|
|
|
|
|
|
+ if($match['status'] == 0 || $match['status'] == 1){
|
|
|
return json_encode(['status'=>4,'msg'=>'该赛事进程下没有任何订单']);
|
|
return json_encode(['status'=>4,'msg'=>'该赛事进程下没有任何订单']);
|
|
|
}
|
|
}
|
|
|
$res = \App\Models\Stzqresult::where ('match_id', $match_id)->update(['status' =>3]);
|
|
$res = \App\Models\Stzqresult::where ('match_id', $match_id)->update(['status' =>3]);
|