|
@@ -129,10 +129,14 @@ class MoneyBuyStr extends BaseModel
|
|
|
} else if ($data[$i]->status == 1 && $data[$i]->settle_status == 2) {
|
|
} else if ($data[$i]->status == 1 && $data[$i]->settle_status == 2) {
|
|
|
$data[$i]->order_status = '投注<br>' . $settle_status;
|
|
$data[$i]->order_status = '投注<br>' . $settle_status;
|
|
|
} else if ($data[$i]->status == 2) {
|
|
} else if ($data[$i]->status == 2) {
|
|
|
- $data[$i]->order_status = '作废<br>' . $settle_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]->order_status = '作废<br>' . $settle_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]->order_status = '已作废';
|
|
|
} else if ($data[$i]->status == 3) {
|
|
} else if ($data[$i]->status == 3) {
|
|
|
- $data[$i]->order_status = '撤单<br>' . $settle_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]->order_status = '撤单<br>' . $settle_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]->order_status = '已作废';
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if ($data[$i]->game_status == 0) {
|
|
if ($data[$i]->game_status == 0) {
|
|
|
$data[$i]->game_status = '待开奖';
|
|
$data[$i]->game_status = '待开奖';
|
|
|
} else if ($data[$i]->game_status == 1) {
|
|
} else if ($data[$i]->game_status == 1) {
|
|
@@ -143,9 +147,17 @@ class MoneyBuyStr extends BaseModel
|
|
|
$data[$i]->game_status = '未中奖';
|
|
$data[$i]->game_status = '未中奖';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
$str_type = str_replace('*', '串', $data[$i]->str_type);
|
|
$str_type = str_replace('*', '串', $data[$i]->str_type);
|
|
|
$mun = explode('串', $data[$i]->str_type);
|
|
$mun = explode('串', $data[$i]->str_type);
|
|
|
- $data[$i]->detail_content = $data[$i]->game_status . ' [<a class="detail" lay-event="detail" pid="id" uri="/admin/SoccerStringNoteList/detail/?id=" href="/admin/SoccerStringNoteList/detail/?id=' . $data[$i]->id . '"> 详情 </a>]';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if ($data[$i]->status != 3) {
|
|
|
|
|
+ $data[$i]->detail_content = $data[$i]->game_status . ' [<a class="detail" lay-event="detail" pid="id" uri="/admin/SoccerStringNoteList/detail/?id=" href="/admin/SoccerStringNoteList/detail/?id=' . $data[$i]->id . '"> 详情 </a>]';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $data[$i]->detail_content = '';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//$data[$i]->detail_content = $data[$i]->settle_status.':'.$mun[0].' [<a class="detail" lay-event="detail" pid="id" uri="/admin/SoccerStringNoteList/detail/?id=" href="/admin/SoccerStringNoteList/detail/?id='.$data[$i]->id.'"> 详情 </a>]';
|
|
//$data[$i]->detail_content = $data[$i]->settle_status.':'.$mun[0].' [<a class="detail" lay-event="detail" pid="id" uri="/admin/SoccerStringNoteList/detail/?id=" href="/admin/SoccerStringNoteList/detail/?id='.$data[$i]->id.'"> 详情 </a>]';
|
|
|
$data[$i]->str_type = $data[$i]->str_type . '<br>(<span>' . $data[$i]->account_name . '</span>)';
|
|
$data[$i]->str_type = $data[$i]->str_type . '<br>(<span>' . $data[$i]->account_name . '</span>)';
|
|
|
|
|
|
|
@@ -213,10 +225,10 @@ class MoneyBuyStr extends BaseModel
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//投注金额汇总统计
|
|
//投注金额汇总统计
|
|
|
- function MoneyCount($where = '',$match_id='',$game_code='')
|
|
|
|
|
|
|
+ function MoneyCount($where = '', $match_id = '', $game_code = '')
|
|
|
{
|
|
{
|
|
|
$data = array();
|
|
$data = array();
|
|
|
- if(empty($match_id)){
|
|
|
|
|
|
|
+ if (empty($match_id)) {
|
|
|
$data['all_money'] = $this->where('status', '1')->sum('money');
|
|
$data['all_money'] = $this->where('status', '1')->sum('money');
|
|
|
$data['all_prize_money'] = $this->where('status', '1')->sum('prize_money');
|
|
$data['all_prize_money'] = $this->where('status', '1')->sum('prize_money');
|
|
|
$data['alraedy_prize_money'] = $this->where('settle_status', '2')->where('status', '1')->sum('gain_money');
|
|
$data['alraedy_prize_money'] = $this->where('settle_status', '2')->where('status', '1')->sum('gain_money');
|
|
@@ -228,17 +240,17 @@ class MoneyBuyStr extends BaseModel
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//追加 如果有赛事id+球类代码 则查询该赛事下所有串式投注
|
|
//追加 如果有赛事id+球类代码 则查询该赛事下所有串式投注
|
|
|
- if(!empty($game_code) and !empty($match_id)){
|
|
|
|
|
- $where_match = ['game_code'=>$game_code,'match_id'=>$match_id,'bet_type'=>2];
|
|
|
|
|
|
|
+ if (!empty($game_code) and !empty($match_id)) {
|
|
|
|
|
+ $where_match = ['game_code' => $game_code, 'match_id' => $match_id, 'bet_type' => 2];
|
|
|
$moneyBuyMatch = new MoneyBuyMatchModel();
|
|
$moneyBuyMatch = new MoneyBuyMatchModel();
|
|
|
$str_order_ids = $moneyBuyMatch->getByAttrs($where_match)->toArray();
|
|
$str_order_ids = $moneyBuyMatch->getByAttrs($where_match)->toArray();
|
|
|
-
|
|
|
|
|
|
|
|
|
|
- if(empty($str_order_ids)){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (empty($str_order_ids)) {
|
|
|
$data['all_money'] = 0;
|
|
$data['all_money'] = 0;
|
|
|
$data['all_prize_money'] = 0;
|
|
$data['all_prize_money'] = 0;
|
|
|
$data['alraedy_prize_money'] = 0;
|
|
$data['alraedy_prize_money'] = 0;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
$data['all_money'] = $this->where('status', '1')->sum('money');
|
|
$data['all_money'] = $this->where('status', '1')->sum('money');
|
|
|
$data['all_prize_money'] = $this->where('status', '1')->sum('prize_money');
|
|
$data['all_prize_money'] = $this->where('status', '1')->sum('prize_money');
|
|
|
$data['alraedy_prize_money'] = $this->where('settle_status', '2')->where('status', '1')->sum('gain_money');
|
|
$data['alraedy_prize_money'] = $this->where('settle_status', '2')->where('status', '1')->sum('gain_money');
|
|
@@ -249,7 +261,7 @@ class MoneyBuyStr extends BaseModel
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return $data;
|
|
return $data;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -375,12 +387,12 @@ class MoneyBuyStr extends BaseModel
|
|
|
//获取串式注单信息
|
|
//获取串式注单信息
|
|
|
public function strmatchs()
|
|
public function strmatchs()
|
|
|
{
|
|
{
|
|
|
- $match = \App\Models\MoneyBuyMatch::select('match_id','batch_id')->where('bet_type',2)->get()->toArray ();
|
|
|
|
|
- $str = $this->select('order_id','batch_id')->get()->toArray ();
|
|
|
|
|
- for ($i=0; $i < count($str); $i++){
|
|
|
|
|
|
|
+ $match = \App\Models\MoneyBuyMatch::select('match_id', 'batch_id')->where('bet_type', 2)->get()->toArray();
|
|
|
|
|
+ $str = $this->select('order_id', 'batch_id')->get()->toArray();
|
|
|
|
|
+ for ($i = 0; $i < count($str); $i++) {
|
|
|
$str[$i]['match_ids'] = array();
|
|
$str[$i]['match_ids'] = array();
|
|
|
- for ($j=0; $j < count($match); $j++){
|
|
|
|
|
- if($str[$i]['batch_id'] == $match[$j]['batch_id']){
|
|
|
|
|
|
|
+ for ($j = 0; $j < count($match); $j++) {
|
|
|
|
|
+ if ($str[$i]['batch_id'] == $match[$j]['batch_id']) {
|
|
|
$str[$i]['match_ids'][] = $match[$j]['match_id'];
|
|
$str[$i]['match_ids'][] = $match[$j]['match_id'];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|