彭俊 6 жил өмнө
parent
commit
efaeff6937

+ 23 - 6
app/Models/SportsNoteList.php

@@ -100,7 +100,7 @@ class SportsNoteList extends BaseModel
         $invalid_money = \App\Models\Money_details::SELECT($select_zf)->whereIn('trade_type', [3,4,25])->whereIn('trade_id',$order_ids)->get();
 
         //获取注单 输赢 结果
-        $select_play = ['order_id','result','matchresult','is_rolling','condition','odds','odds_code','bet_money','home_team','guest_team','home_score','guest_score'];
+        $select_play = ['order_id','result','matchresult','is_rolling','condition','odds','p_code','odds_code','bet_money','home_team','guest_team','home_score','guest_score'];
         $content = \App\Models\MoneyBuyMatch::SELECT($select_play)->where('bet_type', '1')->whereIn('order_id',$order_ids)->get();
 
         //获取 注单 玩法
@@ -124,13 +124,29 @@ class SportsNoteList extends BaseModel
                         $teamName = $v->guest_team;
                     }
                     $v->odds_name = $vv->odds_name;
-                    //如果是滚球投注 追加当前比分
-                    if($v->is_rolling == 1){
-                        $v->content = $vv->odds_name . '<br>' . $v->condition .'-'. $teamName.'('.$v->home_score.'-'.$v->guest_score.')<br>@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
+                    //不是独赢玩法投注
+                    if($v->p_code != 'C'){
+                        //如果是滚球投注 追加当前比分
+                        if($v->is_rolling == 1){
+                            $v->content = $vv->odds_name . '<br>' . $v->condition .'-'. $teamName.'('.$v->home_score.'-'.$v->guest_score.')<br>@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
+                        }else{
+                            $v->content = $vv->odds_name . '<br>' . $v->condition .'-'. $teamName.'<br>@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
+                        }
                     }else{
-                        $v->content = $vv->odds_name . '<br>' . $v->condition .'-'. $teamName.'<br>@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
+                        //独赢玩法
+                        //如果不是1或2,则为和局
+                        if($v->condition != 1 and $v->condition != 2 ){
+                            $v->condition = '和局';
+                        }else{
+                            $v->condition = '';
+                        }
+                        //如果是滚球投注 追加当前比分
+                        if($v->is_rolling == 1){
+                            $v->content = $vv->odds_name . '<br>' . $v->condition .'-'. $teamName.'('.$v->home_score.'-'.$v->guest_score.')<br>@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
+                        }else{
+                            $v->content = $vv->odds_name . '<br>' . $v->condition .'-'. $teamName.'<br>@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
+                        }
                     }
-
                 }
             }
         }
@@ -524,6 +540,7 @@ class SportsNoteList extends BaseModel
                 $content_str['content'] =  $typeName.'<br>'.$content1.$content_str['content']. '<span>' .  '</span>(' . $content_str['matchresult'] . ')<br>';
             }
         }
+
         //冠军联赛注单 详情
         else{
             if ($content_str['result'] == '未处理' || $order->status > 1) {