...
|
...
|
@@ -41,6 +41,18 @@ class StatisticalController extends AdminBaseController{ |
|
|
$salesman_money += $val['money'];
|
|
|
}
|
|
|
$this -> assign('salesman_money',$salesman_money);
|
|
|
// 业务员总余额
|
|
|
$users_where = [
|
|
|
'a.create_time' => ['>=', 0],
|
|
|
'a.status' => ['in',[2,3]]
|
|
|
];
|
|
|
$total_balance = Db::name('my_user') -> alias('a')
|
|
|
->field('a.*,b.user_nickname')
|
|
|
->join('user b','a.uid = b.id','LEFT')
|
|
|
->where($users_where)
|
|
|
->order(['a.balance'=>'DESC','a.create_time'=>'DESC'])
|
|
|
->sum('a.balance');
|
|
|
$this -> assign('total_balance',$total_balance);
|
|
|
//显示平台抽成收益
|
|
|
$income = Db::name('income_money') -> where($where3) -> select();
|
|
|
$income_money = 0;
|
...
|
...
|
|