瀏覽代碼

追加推送 5/9

彭俊 6 年之前
父節點
當前提交
221c97786e
共有 3 個文件被更改,包括 25 次插入28 次删除
  1. 6 9
      app/Lib/Settlement/SettlementOrder.php
  2. 18 18
      app/Models/SportsSoccer.php
  3. 1 1
      resources/views/admin/user/index.blade.php

+ 6 - 9
app/Lib/Settlement/SettlementOrder.php

@@ -82,7 +82,7 @@ class SettlementOrder extends SettlementBase
     public function singOrder($order_id) {
         // 查询订单下所有的单式注单
         $simplexData = DB :: table('money_buy_simplex')
-            -> select('batch_id', 'account_identity', 'order_id', 'money', 'game_code', 'info_identity')
+            -> select('batch_id', 'account_identity', 'order_id', 'money', 'game_code', 'info_identity','match_id')
             -> where(['order_id' => $order_id])
             -> first();
         // 查询单式注单下的所有玩法
@@ -206,16 +206,13 @@ class SettlementOrder extends SettlementBase
                   if (!in_array($val->result,[-1,1,2,3,4])){  throw  new  \Exception('match 比赛结果异常->'.$val->id); }
 
                   if ($val->result == -1){
-                       $this->BuyDatasMainModel->wait_match_num = 0 ;
-                       $this->BuyDatasMainModel->prize_note = 0 ;
-                       $this->BuyDatasMainModel->settle_status = 2 ;
-                       $this->BuyDatasMainModel->gain_money = 0 ;
-
-                       $ret = $this->BuyDatasMainModel->save();
+                      /*
+                       $ret = DB::table('money_buy_str')->where('id',$this->BuyDatasMainModel->id)->update(['wait_match_num'=>0,'prize_note'=>0,'settle_status'=>2,'gain_money'=>0]);
                        if (!$ret){ throw  new \Exception('更新数据出错1!');   }
-
                        $ret = DB::update('update money_buy_str  set settle_status=2,game_status=3,gain_money=0  where batch_id = ?', [$batch_id]);
-                       if(!($ret || $ret===0)){        throw  new \Exception('更新数据出错2!');      }
+                       */
+                       DB::table('money_buy_str')->where('batch_id',$batch_id)->update(['wait_match_num'=>0,'prize_note'=>0,'game_status'=>3,'settle_status'=>2,'gain_money'=>0]);
+                       //if(!($ret || $ret===0)){        throw  new \Exception('更新数据出错2!');      }
                        return true ;
                   }
 

+ 18 - 18
app/Models/SportsSoccer.php

@@ -32,24 +32,24 @@ class SportsSoccer extends BaseModel {
             return -2021052003; //
         }
         for($i=0;$i<count($data);$i++){
-            if($data[$i]->match_date < date('Y-m-d',time())){
-                $data[$i]->status = '2';
-                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
-            }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time)+5400 <= strtotime(date('H:i:s',time()))){
-                $data[$i]->status = '2';
-                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
-            }
-            else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) < strtotime(date('H:i:s',time())) && strtotime(date('H:i:s',time())) < strtotime($data[$i]->match_time)+5400){
-                $data[$i]->status = '1';
-                //$this->where('id', $data[$i]->id)->update(['status' => 1]);
-            }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) > strtotime(date('H:i:s',time()))){
-                $data[$i]->status = '0';
-                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
-            }
-            else if($data[$i]->match_date > date('Y-m-d',time())){
-                $data[$i]->status = '0';
-                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
-            }
+//            if($data[$i]->match_date < date('Y-m-d',time())){
+//                $data[$i]->status = '2';
+//                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
+//            }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time)+5400 <= strtotime(date('H:i:s',time()))){
+//                $data[$i]->status = '2';
+//                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
+//            }
+//            else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) < strtotime(date('H:i:s',time())) && strtotime(date('H:i:s',time())) < strtotime($data[$i]->match_time)+5400){
+//                $data[$i]->status = '1';
+//                //$this->where('id', $data[$i]->id)->update(['status' => 1]);
+//            }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) > strtotime(date('H:i:s',time()))){
+//                $data[$i]->status = '0';
+//                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
+//            }
+//            else if($data[$i]->match_date > date('Y-m-d',time())){
+//                $data[$i]->status = '0';
+//                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
+//            }
 
             if($data[$i]->status==0){
                 $data[$i]->status = '未开始';

+ 1 - 1
resources/views/admin/user/index.blade.php

@@ -97,7 +97,7 @@
 	</script>
 
 	<script type="text/html" id="userdetail">
-	  <a href="/admin/user/view?identity=@{{d.identity}}">@{{ d.account}}</a><br>
+	  @{{ d.account}}<br>
 	  
 	  @{{d.group_name}}
 	</script>