彭俊 hace 6 años
padre
commit
d2811d8a5c

+ 1 - 1
app/Http/Controllers/Admin/SoccerNoteListController.php

@@ -377,7 +377,7 @@ class SoccerNoteListController extends Controller
         $dt->addColsFields('money_match_time', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
         $dt->addColsFields('order_status', array('sort' => false, 'width' => 80));
         $dt->addColsFields('account_money', array('templet' => '#userdetail', 'sort' => false, 'width' => 110));
-        $dt->addColsFields('game_status', array('sort' => false, 'width' => 90));
+        // $dt->addColsFields('game_status', array('sort' => false, 'width' => 90));
         //$arr[] = 'view';
 //        if (checkRriv('/admin/SoccerNoteList/edit')) {
 //            $arr[] = 'edit';

+ 50 - 33
app/Models/SportsNoteList.php

@@ -69,9 +69,6 @@ class SportsNoteList extends BaseModel
         foreach($orderData as $k=>$v){
             //所有注单 id
             $order_ids[] = $v->order_id;
-            $v->match_id_order = '<a href="/admin/'.$c_name.'/outcome?home_team=' . $v->match_id . '">' . $v->match_id . '</a> (<span>' . $v->account_name . '</span>)<br>' . $v->order_id;
-            $v->home_guest = $v->home_team . ' VS ' . $v->guest_team;
-            $v->time = '开赛:' . $v->match_date . ' ' . $v->match_time;
         }
 
         //获取 注单 反水 金额变动记录
@@ -101,18 +98,29 @@ class SportsNoteList extends BaseModel
 
         //生成最终数据
         foreach($orderData as $k=>$v){
-        // dd(' <button style="margin-left: 0;" onclick="setScore_v2"("'.$v->order_id.'","'.$v->match_id.'","'.$type.'")"  class="layui-btn layui-btn-sm settlement">结算</button>');
+            //普通赛事投注 赛事id+订单id
+            if($v->is_champion == 0){
+                $v->match_id_order = '<a href="/admin/'.$c_name.'/outcome?home_team=' . $v->match_id . '">' . $v->match_id . '</a> (<span>' . $v->account_name . '</span>)<br>' . $v->order_id;
+                $v->home_guest = $v->home_team . ' VS ' . $v->guest_team;
+                $v->time = '开赛:' . $v->match_date . ' ' . $v->match_time;
+                //下注时间/开赛时间
+                $v->money_match_time = '下注:' . $v->money_time . $v->time;
 
-            //追加输赢结果 /投注详情
-            $v->content = $this->getOrderC($content,$v);
-            
-            //下注时间/开赛时间
-            $v->money_match_time = '下注:' . $v->money_time . $v->time;
+            }
+            //冠军联赛投注 联赛id+订单id
+            else{
+                $v->lg_id_order = '<a href="/admin/'.$c_name.'/outcome?home_team=' . $v->match_id . '">' . $v->match_id . '</a> (<span>' . $v->account_name . '</span>)<br>' . $v->order_id;
+                $v->home_guest = "冠军联赛投注";
+                $v->time = '结束:' . $v->last_time;
+                //下注时间/结束时间
+                $v->money_match_time = '下注:' . $v->money_time . $v->time;
 
-           
-            if ($v->status == 2 || $v->status == 3) {
             }
+           //money_match_time
 
+            //追加输赢结果 /投注详情
+            $v->content = $this->getOrderC($content,$v);
+            
             //未作废/撤单 数据
             if($v->status < 2){
                 //反水
@@ -184,10 +192,7 @@ class SportsNoteList extends BaseModel
      * 拼接 订单详情 字段内容
      */
     public function getOrderC($content,$order){
-        
-
         $content_str = commonFunction::filter_by_value($content,'order_id',$order->order_id);
-        dd($content_str);
          //===投注详情===
          if (!empty($order->match_time)) {
             $content1 = '[' . $order->match_time . ']';
@@ -197,30 +202,42 @@ class SportsNoteList extends BaseModel
         }
 
         // 当前赛事 投注 结果  0未处理  1 赢 -1输  2平 3赢半平半  4输半平半
-        if ($content_str['result'] == 0 || $order->status > 1) {
-            $content = $content1.$content_str['content'];
+        if ($content_str['result'] == 0) {
+            $content_str['result'] = '未处理';
         }
-        else if($order->status == 1) {
-            if ($content_str['result'] == 0) {
-                $content_str['result'] = '未处理';
-            }
-            if ($content_str['result'] == 1) {
-                $content_str['result'] = '赢';
-            }
-            if ($content_str['result'] == -1) {
-                $content_str['result'] = '输';
-            }
-            if ($content_str['result'] == 2) {
-                $content_str['result'] = '平';
+        if ($content_str['result'] == 1) {
+            $content_str['result'] = '赢';
+        }
+        if ($content_str['result'] == -1) {
+            $content_str['result'] = '输';
+        }
+        if ($content_str['result'] == 2) {
+            $content_str['result'] = '平';
+        }
+        if ($content_str['result'] == 3) {
+            $content_str['result'] = '赢半平半';
+        }
+        if ($content_str['result'] == 4) {
+            $content_str['result'] = '输半平半';
+        }
+        //普通赛事注单 详情
+        if($order->is_champion == 0){
+            if ($content_str['result'] == '未处理' || $order->status > 1) {
+                $content = $content1.$content_str['content'];
             }
-            if ($content_str['result'] == 3) {
-                $content_str['result'] = '赢半平半';
+            else if($order->status == 1) {
+                $content = $content1.$content_str['content']. '<span>' . $content_str['result'] . '</span>(' . $content_str['matchresult'] . ')<br>';
             }
-            if ($content_str['result'] == 4) {
-                $content_str['result'] = '输半平半';
+        }
+        //冠军联赛 注单
+        else{
+            if ($content_str['result'] == '未处理' || $order->status > 1) {
+                $content = $content_str['home_team'] . '<br>' . $order->content . $content_str['odds_code'] . '<br>' . $content_str['condition'] . ' ' . $order->team . '@' . $content_str['odds'] . ' ¥' . $content_str['bet_money'] . '<br>';
+            } else {
+                $content = $content_str['home_team'] . '<br>' . $order->content . $content_str['odds_code'] . '<br>' . $content_str['condition'] . ' ' . $order->team . '@' . $content_str['odds'] . ' ¥' . $content_str['bet_money'] . '<br><span>' . $content_str['result'] . '</span>(' . $content_str['matchresult'] . ')<br>';
             }
-            $content = $content1.$content_str['content']. '<span>' . $content_str['result'] . '</span>(' . $content_str['matchresult'] . ')<br>';
         }
+       
 
         return $content;
     }