财务管理-游戏管理 游戏名称列表和导出优化

master
chenzhi 5 years ago
parent 43562f6746
commit 2b7f434955

@ -7894,7 +7894,7 @@ class ExportController extends Controller
$xlsData = D("spend")->gameStatistics($map);
foreach ($xlsData as $key => $value) {
$xlsData[$key]['game_name'] = substr($value["game_name"],0,strrpos($value["game_name"],'('));
// $xlsData[$key]['game_name'] = substr($value["game_name"],0,strrpos($value["game_name"],'('));
$xlsData[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'];
if ($value['sdk_version'] == 1) {
$xlsData[$key]['sdk_version'] = '安卓';
@ -7902,7 +7902,6 @@ class ExportController extends Controller
$xlsData[$key]['sdk_version'] = '苹果';
}
}
$totalData = D("spend")->totalGameStatistics($map);
$sumCash = $totalData['cash_count'];

@ -841,7 +841,7 @@ class SpendModel extends Model
public function gameStatistics($map, $row = 0, $page = 1)
{
$query = M("Spend s use index(game_time)","tab_")
->field("s.game_id,s.game_name,p.partner as partner_name, g.game_type_name,
->field("s.game_id,g.relation_game_name game_name,p.partner as partner_name, g.game_type_name,
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 = -1 THEN pay_amount ELSE 0 END) as inside_cash_count,g.sdk_version")

Loading…
Cancel
Save