|
|
@@ -40,7 +40,7 @@ class SportsNoteList extends BaseModel
|
|
|
->join('st_' . $type . '_competition', 'st_' . $type . '_competition.id', '=', 'money_buy_simplex.match_id')
|
|
|
->join('money_buy_match','money_buy_match.order_id','=','money_buy_simplex.order_id')
|
|
|
->join('st_' . $type . '_league', 'money_buy_simplex.lg_id', '=', 'st_' . $type . '_league.id')
|
|
|
- ->select('money_buy_simplex.id', 'money_buy_simplex.account_name', 'money_buy_simplex.is_champion', 'money_buy_simplex.account_identity', 'money_buy_simplex.order_id', 'money_buy_simplex.money', 'money_buy_simplex.prize_money', 'money_buy_simplex.status', 'money_buy_simplex.money_time', 'money_buy_simplex.settle_status', 'money_buy_simplex.gain_money', 'money_buy_simplex.game_code', 'money_buy_simplex.match_id', 'money_buy_simplex.game_status','money_buy_simplex.use_mark', 'st_' . $type . '_competition.home_team', 'st_' . $type . '_competition.guest_team', 'st_' . $type . '_competition.match_date', 'st_' . $type . '_competition.match_time', 'money_buy_simplex.lg_id', 'st_' . $type . '_competition.status as match_status', 'money_details.money_cash', 'money_buy_simplex.batch_id', 'st_' . $type . '_league.name_chinese as league', 'st_' . $type . '_league.last_time')
|
|
|
+ ->select('money_buy_simplex.id', 'money_buy_simplex.account_name','money_buy_match.is_rolling','money_buy_match.roll_time', 'money_buy_simplex.is_champion', 'money_buy_simplex.account_identity', 'money_buy_simplex.order_id', 'money_buy_simplex.money', 'money_buy_simplex.prize_money', 'money_buy_simplex.status', 'money_buy_simplex.money_time', 'money_buy_simplex.settle_status', 'money_buy_simplex.gain_money', 'money_buy_simplex.game_code', 'money_buy_simplex.match_id', 'money_buy_simplex.game_status','money_buy_simplex.use_mark', 'st_' . $type . '_competition.home_team', 'st_' . $type . '_competition.guest_team', 'st_' . $type . '_competition.match_date', 'st_' . $type . '_competition.match_time', 'money_buy_simplex.lg_id', 'st_' . $type . '_competition.status as match_status', 'money_details.money_cash', 'money_buy_simplex.batch_id', 'st_' . $type . '_league.name_chinese as league', 'st_' . $type . '_league.last_time')
|
|
|
->whereIn('money_buy_simplex.roll_ratify',array(0,1,-1))
|
|
|
->where($where)
|
|
|
//->distinct('money_buy_match.order_id')
|
|
|
@@ -55,24 +55,32 @@ class SportsNoteList extends BaseModel
|
|
|
$match_c_name = 'sportsfoot';
|
|
|
//足球联赛
|
|
|
$leage_c_name = 'ZqChampionsLeague';
|
|
|
+ //球类名称
|
|
|
+ $gameName = '足球';
|
|
|
}
|
|
|
if($type == 'lq'){
|
|
|
//篮球赛事
|
|
|
$match_c_name = 'Sportsbk';
|
|
|
//篮球联赛
|
|
|
$leage_c_name = 'LqChampionsLeague';
|
|
|
+ //球类名称
|
|
|
+ $gameName = '篮球';
|
|
|
}
|
|
|
if($type == 'wq'){
|
|
|
//网球赛事
|
|
|
$match_c_name = 'Sportswq';
|
|
|
//网球联赛
|
|
|
$leage_c_name = 'WqChampionsLeague';
|
|
|
+ //球类名称
|
|
|
+ $gameName = '网球';
|
|
|
}
|
|
|
if($type == 'bq'){
|
|
|
//棒球赛事
|
|
|
$match_c_name = 'Sportsbq';
|
|
|
//棒球联赛
|
|
|
$leage_c_name = 'BqChampionsLeague';
|
|
|
+ //球类名称
|
|
|
+ $gameName = '棒球';
|
|
|
}
|
|
|
|
|
|
//获取注单 id
|
|
|
@@ -103,8 +111,21 @@ class SportsNoteList extends BaseModel
|
|
|
foreach($content as $k=>$v){
|
|
|
foreach($result as $kk=>$vv){
|
|
|
if($v->odds_code == $vv->odds_code){
|
|
|
+ //匹配球队
|
|
|
+ $teamType_home = commonFunction::checkstr($vv->odds_name,'主队');
|
|
|
+ $teamType_guest = commonFunction::checkstr($vv->odds_name,'客队');
|
|
|
+
|
|
|
+ //主队名
|
|
|
+ if($teamType_home == 1){
|
|
|
+ $teamName = $v->home_team;
|
|
|
+ }
|
|
|
+ //客队名
|
|
|
+ if($teamType_guest == 1){
|
|
|
+ $teamName = $v->guest_team;
|
|
|
+ }
|
|
|
+
|
|
|
$v->odds_name = $vv->odds_name;
|
|
|
- $v->content = $vv->odds_name . '<br>' . $v->condition . '@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
|
|
|
+ $v->content = $vv->odds_name . '<br>' . $v->condition .'-'. $teamName.'@' . $v->odds . ' ¥' . $v->bet_money . '<br>';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -132,7 +153,7 @@ class SportsNoteList extends BaseModel
|
|
|
//money_match_time
|
|
|
|
|
|
//追加输赢结果 /投注详情
|
|
|
- $contentData = $this->getOrderC($content,$v);
|
|
|
+ $contentData = $this->getOrderC($content,$v,$gameName);
|
|
|
$v->content = $contentData['content'];
|
|
|
|
|
|
//未作废/撤单 数据
|
|
|
@@ -424,16 +445,19 @@ class SportsNoteList extends BaseModel
|
|
|
/**
|
|
|
* 拼接 订单详情 字段内容
|
|
|
*/
|
|
|
- public function getOrderC($content,$order){
|
|
|
+ public function getOrderC($content,$order,$gameName){
|
|
|
$content_str = commonFunction::filter_by_value($content,'order_id',$order->order_id);
|
|
|
|
|
|
//===投注详情===
|
|
|
- if (!empty($order->match_time)) {
|
|
|
- $content1 = '[' . $order->match_time . ']';
|
|
|
- } else if (!empty($order->last_time)) {
|
|
|
- $datetime = explode(' ', $order->last_time);
|
|
|
- $content1 = '[' . $datetime[1] . ']';
|
|
|
+ $content1 = '';
|
|
|
+ //如果是滚球投注 追加投注时赛事进行时间
|
|
|
+ if (!empty($order->roll_time) and $order->is_rolling == 1) {
|
|
|
+ $content1 = '[' . $order->roll_time . ']';
|
|
|
}
|
|
|
+ // else if (!empty($order->last_time)) {
|
|
|
+ // $datetime = explode(' ', $order->last_time);
|
|
|
+ // $content1 = '[' . $datetime[1] . ']';
|
|
|
+ // }
|
|
|
|
|
|
// 当前赛事 投注 结果 0未处理 1 赢 -1输 2平 3赢半平半 4输半平半
|
|
|
if ($content_str['result'] == 0) {
|
|
|
@@ -455,26 +479,49 @@ class SportsNoteList extends BaseModel
|
|
|
$content_str['result'] = '输半平半';
|
|
|
}
|
|
|
|
|
|
+ //当前投注所属球类及盘口
|
|
|
+ if($order->is_rolling == 0){//未知 盘口
|
|
|
+ $typeName = $gameName.'未知盘口';
|
|
|
+ }
|
|
|
+ if($order->is_rolling == 1){//滚球
|
|
|
+ $typeName = $gameName.'滚球';
|
|
|
+ }
|
|
|
+ if($order->is_rolling == 2){//即将
|
|
|
+ $typeName = $gameName.'即将';
|
|
|
+ }
|
|
|
+ if($order->is_rolling == 3){//今日
|
|
|
+ $typeName = $gameName.'今日';
|
|
|
+ }
|
|
|
+ if($order->is_rolling == 4){//早盘
|
|
|
+ $typeName = $gameName.'早盘';
|
|
|
+ }
|
|
|
+ if($order->is_rolling == 5){//串场
|
|
|
+ $typeName = $gameName.'串场';
|
|
|
+ }
|
|
|
+ if($order->is_rolling == 6){//冠军
|
|
|
+ $typeName = $gameName.'冠军';
|
|
|
+ }
|
|
|
+
|
|
|
//普通赛事注单 详情
|
|
|
if($order->is_champion == 0){
|
|
|
if ($content_str['result'] == '未处理' || $order->status > 1) {
|
|
|
if(!empty($content_str['content'])){
|
|
|
- $content_str['content'] = $content1.$content_str['content'];
|
|
|
+ $content_str['content'] = $typeName.'<br>'.$content1.$content_str['content'];
|
|
|
}else{
|
|
|
- $content_str['content'] = $content1.'未知玩法';
|
|
|
+ $content_str['content'] = $typeName.'<br>'.$content1.'未知玩法';
|
|
|
}
|
|
|
}
|
|
|
else if($order->status == 1) {
|
|
|
// $content_str['content'] = $content1.$content_str['content']. '<span>' . $content_str['result'] . '</span>(' . $content_str['matchresult'] . ')<br>';
|
|
|
- $content_str['content'] = $content1.$content_str['content']. '<span>' . '</span>(' . $content_str['matchresult'] . ')<br>';
|
|
|
+ $content_str['content'] = $typeName.'<br>'.$content1.$content_str['content']. '<span>' . '</span>(' . $content_str['matchresult'] . ')<br>';
|
|
|
}
|
|
|
}
|
|
|
//冠军联赛注单 详情
|
|
|
else{
|
|
|
if ($content_str['result'] == '未处理' || $order->status > 1) {
|
|
|
- $content_str['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>';
|
|
|
+ $content_str['content'] = $typeName.'<br>'.$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_str['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_str['content'] = $typeName.'<br>'.$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>';
|
|
|
}
|
|
|
}
|
|
|
|