vali 6 jaren geleden
bovenliggende
commit
d7d7cb02d9
1 gewijzigde bestanden met toevoegingen van 11 en 0 verwijderingen
  1. 11 0
      app/Logic/UnSettmatchLogic.php

+ 11 - 0
app/Logic/UnSettmatchLogic.php

@@ -76,6 +76,7 @@ class UnSettmatchLogic
             $this->doSimple();
             $this->doStr();
             $this->changeStatus($game_code, $match_id);
+            $this->changeMatchResult($game_code, $match_id);
 
             DB::commit();
         } catch (\Exception $e) {
@@ -137,9 +138,11 @@ class UnSettmatchLogic
         $time = date("Y-m-d H:i:s");
         $userMoneyChange = [];   //用户资金变化记录,好一次性更新
 
+        $orders_array = [];
         foreach ($simples as $item) {
             $gain_money = floatval($item->gain_money);
             $accountIdent = $item->account_identity;
+            $orders_array[] = $item->order_id;
 
             $mModel = new MoneyDetailsModel();
             $mModel->info_identity = UUID();
@@ -245,6 +248,14 @@ class UnSettmatchLogic
         return $ret;
     }
 
+    public function changeMatchResult($game_code, $match_id)
+    {
+        $table = 'money_buy_match';
+        $ret = DB::table($table)->where('match_id', $match_id)->where('game_code', $game_code)->update(['result' => 2, 'matchresult' => '撤单平局!']);
+        return $ret;
+    }
+
+
     //得到比赛结果 ,看是不已结算等信息
     public function getResult($game_code, $match_id)
     {