游戏统计添加元素修正

master
zhengyongxing 5 years ago
parent 0ebde4cb17
commit b698495dbb

@ -889,13 +889,12 @@ SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count,g.sd
->field("SUM(pay_amount) as notice_fail_count,game_id") ->field("SUM(pay_amount) as notice_fail_count,game_id")
->where(['s.pay_status' => 1, 'pay_game_status' => 0]) ->where(['s.pay_status' => 1, 'pay_game_status' => 0])
->where($map) ->where($map)
->select(false); ->find();
$query = M("Spend s use index(game_time)","tab_") $query = M("Spend s use index(game_time)","tab_")
->field("SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, ->field("SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count,notice_fail_count") SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count");
->join("LEFT JOIN ({$noticeFailData})a ON s.game_id = a.game_id");
if ($join) { if ($join) {
$query = $query->join('LEFT JOIN tab_game as g ON s.game_id=g.id') $query = $query->join('LEFT JOIN tab_game as g ON s.game_id=g.id')
->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id'); ->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id');
@ -903,6 +902,7 @@ SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count,noti
$data = $query->where(['s.pay_status' => 1, 'pay_game_status' => 1]) $data = $query->where(['s.pay_status' => 1, 'pay_game_status' => 1])
->where($map) ->where($map)
->find(); ->find();
$data['notice_fail_count'] = $noticeFailData['notice_fail_count'];
// dd($query->_sql()); // dd($query->_sql());
return $data; return $data;
} }

@ -74,7 +74,7 @@
<div class="cf main-place top_nav_list navtab_list"> <div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$_REQUEST['count_date']}游戏统计</h3> <h3 class="page_title">{$_REQUEST['count_date']}游戏统计</h3>
<p class="description_text">说明:仅统计通知成功</p> <p class="description_text">说明:仅统计通知成功,结算给上游的是支付成功通知成功,就算给公会的是支付成功</p>
</div> </div>
<div class="cf top_nav_list"> <div class="cf top_nav_list">

Loading…
Cancel
Save