|
@@ -132,6 +132,18 @@ class WinfailLogic
|
|
|
return $model;
|
|
return $model;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //冠军比赛结果
|
|
|
|
|
+ public function getGjDatasV2($game_code, $lg_id)
|
|
|
|
|
+ {
|
|
|
|
|
+ $table = 'st_' . $game_code . '_league_result';
|
|
|
|
|
+ $where = ['lg_id' => $lg_id, 'game_name' => $game_code];
|
|
|
|
|
+ $model = DB::table($table)->where($where)->first();
|
|
|
|
|
+ if (empty($model)) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ return $model;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
public function getOddsTypeData($game_code, $match_id)
|
|
public function getOddsTypeData($game_code, $match_id)
|
|
|
{
|
|
{
|
|
@@ -222,7 +234,7 @@ class WinfailLogic
|
|
|
|
|
|
|
|
|
|
|
|
|
//对单式订单 单个更改过比赛结果的订单进行输赢判断 $orderInfoArray一维数组 $matchArray二维数组
|
|
//对单式订单 单个更改过比赛结果的订单进行输赢判断 $orderInfoArray一维数组 $matchArray二维数组
|
|
|
- public function WinFailOneOrder($orderInfo, $matchArray, $result)
|
|
|
|
|
|
|
+ public function WinFailOneOrder($orderInfo, $matchArray, $is_champion)
|
|
|
{
|
|
{
|
|
|
$game_code = $orderInfo->game_code;
|
|
$game_code = $orderInfo->game_code;
|
|
|
$match_id = $orderInfo->match_id;
|
|
$match_id = $orderInfo->match_id;
|
|
@@ -232,13 +244,29 @@ class WinfailLogic
|
|
|
$RefClass = new \ReflectionClass($AdapterObj);
|
|
$RefClass = new \ReflectionClass($AdapterObj);
|
|
|
|
|
|
|
|
$result = json_decode($orderInfo->single_result);
|
|
$result = json_decode($orderInfo->single_result);
|
|
|
- $result['0']->first_score = json_encode($result['0']->first_score, 256);
|
|
|
|
|
- $result['0']->corner_ball = json_encode($result['0']->corner_ball, 256);
|
|
|
|
|
- $result['0']->penalty_card = json_encode($result['0']->penalty_card, 256);
|
|
|
|
|
- $result['0']->warn_more = json_encode($result['0']->warn_more, 256);
|
|
|
|
|
|
|
+ if ($is_champion == 0) {
|
|
|
|
|
+ //还原回原来的类型,以兼容之前的处理
|
|
|
|
|
+ switch (strtolower($orderInfo->game_code)) {
|
|
|
|
|
+ case 'zq':
|
|
|
|
|
+ $result['0']->first_score = json_encode($result['0']->first_score, 256);
|
|
|
|
|
+ $result['0']->corner_ball = json_encode($result['0']->corner_ball, 256);
|
|
|
|
|
+ $result['0']->penalty_card = json_encode($result['0']->penalty_card, 256);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'lq':
|
|
|
|
|
+ $result['0']->home_score = json_encode($result['0']->home_score, 256);
|
|
|
|
|
+ $result['0']->guest_score = json_encode($result['0']->guest_score, 256);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'wq':
|
|
|
|
|
+ $result['0']->inning = json_encode($result['0']->inning, 256);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'bq':
|
|
|
|
|
+ $result['0']->match_score_t = json_encode($result['0']->match_score_t, 256);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ $result['0']->warn_more = json_encode($result['0']->warn_more, 256);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
$winorfalsedef = ['result' => 2, 'matchResult' => 'noRuleOrError'];
|
|
$winorfalsedef = ['result' => 2, 'matchResult' => 'noRuleOrError'];
|
|
|
-
|
|
|
|
|
foreach ($matchArray as $matchModel) {
|
|
foreach ($matchArray as $matchModel) {
|
|
|
$fun1 = $matchModel->odds_code;
|
|
$fun1 = $matchModel->odds_code;
|
|
|
$fun2 = $matchModel->p_code;
|
|
$fun2 = $matchModel->p_code;
|