master
ELF 4 years ago
parent e8a925b64c
commit cefed5c559

@ -753,12 +753,19 @@ class FinanceController extends ThinkController
}
$endTime = time();
$exceptIds = [];
foreach ($data as $key => $value) {
$aggAmount = '0.00';
$deviceType = $value['sdk_version'] == 1 ? 'android' : 'ios';
if ($value['unique_code'] && isset($aggData[$value['unique_code']]) && isset($aggData[$value['unique_code']][$deviceType])) {
$aggAmount = number_format($aggData[$value['unique_code']][$deviceType], 2, '.', '');
}
if ($aggAmount != '0.00') {
$value['cash_count'] = 0;
$value['balance_coin_count'] = 0;
$value['inside_cash_count'] = 0;
$exceptIds[] = $value['game_id'];
}
$data[$key]['all_cash_count'] = number_format($value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'],2,'.','');
$data[$key]['agg_amount'] = $value['unique_code'] ? $aggAmount : '0.00';
}
@ -774,6 +781,13 @@ class FinanceController extends ThinkController
$this->checkListOrCountAuthRestMap($map,[]);
//统计合计
if (count($exceptIds) > 0) {
if (isset($map['_string'])) {
$map['_string'] .= " s.game_id not in (" . implode(',', $exceptIds) . ")";
} else {
$map['_string'] = " s.game_id not in (" . implode(',', $exceptIds) . ")";
}
}
$totalData = D("spend")->totalGameStatistics($map);
$sumCash = $totalData['cash_count'];

Loading…
Cancel
Save