Jonlin 6 anni fa
parent
commit
90fe0b9b20

+ 2 - 2
app/Http/Controllers/Admin/SoccerStringNoteListController.php

@@ -35,7 +35,7 @@ class SoccerStringNoteListController extends Controller
         $dt->setLang('sportsnotelist');
         //$dt->addColsFields('id', array('templet' => '#userdetail', 'sort' => true, 'width' => 80));
         $dt->addColsFields('order_id', array('templet' => '#userdetail', 'sort' => true, 'width' => 200));
-        $dt->addColsFields('str_type', array('templet' => '#userdetail', 'sort' => false, 'width' => 90));
+        $dt->addColsFields('str_type', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
         $dt->addColsFields('detail_content', array('sort' => false, 'width' => 150));
         $dt->addColsFields('money', array('templet' => '#userdetail', 'sort' => false, 'width' => 90));
         $dt->addColsFields('water_return', array('templet' => '#userdetail', 'sort' => false, 'width' => 90));
@@ -44,7 +44,7 @@ class SoccerStringNoteListController extends Controller
         $dt->addColsFields('money_time', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
         $dt->addColsFields('order_status', array('sort' => false, 'width' => 90));
         $dt->addColsFields('account_money', array('templet' => '#userdetail', 'sort' => false, 'width' => 230));
-        $dt->addColsFields('settle_status', array('sort' => false, 'width' => 80));
+        $dt->addColsFields('settle_status', array('sort' => false, 'width' => 90));
 //        if (checkRriv('/admin/SoccerStringNoteList/edit')) {
 //            $arr[] ='edit';
 //        }

+ 25 - 0
app/Models/Comendnotice.php

@@ -14,5 +14,30 @@ class Comendnotice extends BaseModel {
 
     protected $table = 'comendnotice';
 
+    //添加赛事结束纪录
+    function addcomendnotice($match_id){
+        $data = \App\Models\Comendnotice::where(['match_id'=>$match_id,'game_code'=>'zq'])->first();
+        if(!$data){
+            $model = new \App\Models\Comendnotice();
+            $model->status = 0;//联赛id
+            $model->game_code = 'zq';
+            $model->match_id = $match_id;//赛事id
+            $model->ctime = date('Y-m-d H:i:s');
+            $model->save();
+
+            $newapp = new \App\Lib\Settlement\SettlementWinFail();
+            $ret = $newapp->doRun($model->id);
+        }else{
+            $newapp = new \App\Lib\Settlement\SettlementWinFail();
+            \App\Models\Comendnotice::where(['match_id'=>$match_id,'game_code'=>'zq'])->update(['status'=>0]);
+            $ret = $newapp->doRun($data->toArray()['id']);
+            $ret2 =$data->toArray()['id'];
+            if ($ret2['status']==1){
+                \App\Models\Comendnotice::where(['match_id'=>$match_id,'game_code'=>'zq'])->update(['status'=>4]);
+            }
+        }
+        return $ret;
+    }
+
 
 }

+ 1 - 1
app/Models/SportsNoteList.php

@@ -193,7 +193,7 @@ class SportsNoteList extends BaseModel {
             }else{
                 $data[$i]->game_status = $data[$i]->game_status.'<br><a class="layui-btn layui-btn-sm audit" lay-event="detail" pid="id" uri="" href="javascript:void(0)" style="background-color: grey;"> 结算 </a>';
             }
-            
+
             $data[$i]->content = $data[$i]->content1.$data[$i]->content;
 
         }