|
|
|
@ -400,17 +400,20 @@ class FinanceController extends ThinkController
|
|
|
|
|
->group('promote_id')
|
|
|
|
|
->page($page,$row)
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
if (empty(I("root_name"))) {
|
|
|
|
|
$subQueryAll = array_merge($parentData,$subQueryAll);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$sumData = M('spend_user_count','tab_')
|
|
|
|
|
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
|
if (empty(I("root_name"))) {
|
|
|
|
|
$sumData['cash_count'] = number_format($sumData['cash_count'] + $parentData[0]['cash_count'], 2, '.', '');
|
|
|
|
|
$sumData['balance_coin_count'] = number_format($sumData['balance_coin_count'] + $parentData[0]['balance_coin_count'], 2, '.', '');
|
|
|
|
|
$sumData['inside_cash_count'] = number_format($sumData['inside_cash_count'] + $parentData[0]['inside_cash_count'], 2, '.', '');
|
|
|
|
|
$sumData['all_count'] = number_format($sumData['all_count'] + $parentData[0]['all_count'], 2, '.', '');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$count = M('spend_user_count','tab_')
|
|
|
|
|
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
|
|
|
|
|