|
|
@@ -427,8 +427,21 @@ class HttpServerOnlySet
|
|
|
$account = $task['account'];
|
|
|
$money_prize = $task['money_prize'];
|
|
|
|
|
|
+ //如果有一条为输的,订单直接为输了
|
|
|
+ $hasfail = false;
|
|
|
foreach ($matchDatas as $val) {
|
|
|
- if (!in_array($val->result, [-1, 1, 2, 3, 4])) {
|
|
|
+ if ($val->result == -1) {
|
|
|
+ $hasfail = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($hasfail) {
|
|
|
+ $this->PushSqlToArray("update money_buy_str set wait_match_num=0, prize_note=0, game_status=3, settle_status=2, gain_money=0,settlementtime='" . date('Y-m-d H:i:s') . "' where order_id='$order_id' ");
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($matchDatas as $val) {
|
|
|
+ if (!in_array($val->result, [1, 2, 3, 4])) {
|
|
|
throw new \Exception('match比赛结果异常或还没有输赢结果->' . $val->id, 105);
|
|
|
}
|
|
|
}
|
|
|
@@ -438,18 +451,17 @@ class HttpServerOnlySet
|
|
|
throw new \Exception('match 数据异常-' . $order_id, 106);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if (empty($this->SettlementBaseObj)) {
|
|
|
$settlementBase = $this->SettlementBaseObj = new SettlementBase();
|
|
|
} else {
|
|
|
$settlementBase = $this->SettlementBaseObj;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
$newTime = date('Y-m-d H:i:s');
|
|
|
if ($simplexData->status == 1) {
|
|
|
$in_array = [];
|
|
|
foreach ($matchModels as $val) {
|
|
|
+ /*
|
|
|
if (!in_array($val->result, [-1, 1, 2, 3, 4])) {
|
|
|
throw new \Exception('match 比赛结果异常或还没有输赢结果->' . $val->id, 107);
|
|
|
}
|
|
|
@@ -458,6 +470,7 @@ class HttpServerOnlySet
|
|
|
$this->PushSqlToArray("update money_buy_str set wait_match_num=0, prize_note=0, game_status=3, settle_status=2, gain_money=0,settlementtime='" . date('Y-m-d H:i:s') . "' where order_id='$order_id' ");
|
|
|
return true;
|
|
|
}
|
|
|
+ */
|
|
|
$in_array[] = ['odds' => $val->odds, 'winOrLose' => $val->result];
|
|
|
}
|
|
|
|