...
|
...
|
@@ -109,8 +109,8 @@ class AdminIndexController extends AdminBaseController |
|
|
$son_arr = Db::name('user')->where(['parent_id' => $item['id']])->field('id')->select()->toArray();
|
|
|
if (!empty($son_arr)) {
|
|
|
$son_str = '';
|
|
|
foreach ($son_arr as $k => $v) {
|
|
|
if ($k == count($son_arr) - 1) {
|
|
|
foreach ($son_arr as $key => $v) {
|
|
|
if ($key == count($son_arr) - 1) {
|
|
|
$son_str .= $v['id'];
|
|
|
} else {
|
|
|
$son_str .= $v['id'] . ',';
|
...
|
...
|
@@ -121,11 +121,10 @@ class AdminIndexController extends AdminBaseController |
|
|
'pay_type' => ['eq', 3],
|
|
|
'step' => ['neq', 1]
|
|
|
];
|
|
|
//$data = Db::name('zj_order')->where($map)->field('sum(whole) as whole,sum(whole_num) as whole_num')->select();
|
|
|
// $whole = $data[0]['whole'];
|
|
|
// $whole_num = $data[0]['whole_num'];
|
|
|
// $total = $whole - $whole_num;
|
|
|
$total = '???';
|
|
|
$data = Db::name('zj_order')->where($map)->field('sum(whole) as whole,sum(whole_num) as whole_num')->select();
|
|
|
$whole = $data[0]['whole'];
|
|
|
$whole_num = $data[0]['whole_num'];
|
|
|
$total = $whole - $whole_num;
|
|
|
} else {
|
|
|
$total = 0;
|
|
|
}
|
...
|
...
|
|