@ -98,7 +98,7 @@ class FinanceController extends ThinkController
->select();
$sumData = M('spend_month_count','tab_')
->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date,sum(balance_coin_deposit) as balance_coin_deposit")
->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date,sum(balance_coin_deposit) as balance_coin_deposit,sum(bind_coin_count) as bind_coin_count")
->where($map)
->order($order)
->find();
@ -202,6 +202,7 @@ class FinanceController extends ThinkController
@ -328,14 +329,14 @@ class FinanceController extends ThinkController
$map['parent_id'] = 0;
$map['root_id'] = 0;
$subQueryAll = 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')
->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, sum(bind_coin_count) as bind_coin_count')
->where($map)
->group('promote_id')
->page($page,$row)
->select();
$sumData = M('spend_user_count','tab_')
->field('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')
->field('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, sum(bind_coin_count) as bind_coin_count')
->where($map)
->find();
@ -395,7 +396,7 @@ class FinanceController extends ThinkController
$subQueryAll = 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')
->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, sum(bind_coin_count) as bind_coin_count')
->where($map)
->group('promote_id')
->page($page,$row)
@ -405,7 +406,7 @@ class FinanceController extends ThinkController
}
$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')
->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, sum(bind_coin_count) as bind_coin_count')
->where($map)
->find();
if (empty(I("root_name"))) {
@ -413,6 +414,7 @@ class FinanceController extends ThinkController
@ -466,7 +468,7 @@ class FinanceController extends ThinkController
// var_dump($map);die();
$subQueryAll = 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')
->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, sum(bind_coin_count) as bind_coin_count')
->where($map)
->group('promote_id')
->page($page,$row)
@ -475,13 +477,14 @@ class FinanceController extends ThinkController
->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')
->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, sum(bind_coin_count) as bind_coin_count')
->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')
@ -544,19 +547,20 @@ class FinanceController extends ThinkController
}
$data = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')
->where($map)->select();
$map1['parent_id'] = $data[0]['promote_id'];
$map1['count_date'] = $date;
$sunData = M('spend_user_count','tab_')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(cash_count+balance_coin_count+inside_cash_count) as all_count')
->field('promote_id,promote_account, sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count, sum(all_count) as all_count, sum(bind_coin_count) as bind_coin_count')