...
|
...
|
@@ -97,7 +97,7 @@ class AdminIndexController extends AdminBaseController |
|
|
if ($role == 1) {
|
|
|
$map = [
|
|
|
'uid' => ['eq', $item['id']],
|
|
|
'pay_type' => ['eq', 3],
|
|
|
'pay_type' => ['eq', 2],
|
|
|
'step' => ['neq', 1]
|
|
|
];
|
|
|
$data = Db::name('zj_order')->where($map)->field('sum(whole) as whole,sum(whole_num) as whole_num')->select();
|
...
|
...
|
@@ -118,14 +118,13 @@ class AdminIndexController extends AdminBaseController |
|
|
}
|
|
|
$map = [
|
|
|
'uid' => ['in', $son_str],
|
|
|
'pay_type' => ['eq', 3],
|
|
|
'pay_type' => ['eq', 2],
|
|
|
'step' => ['neq', 1]
|
|
|
];
|
|
|
$data = Db::name('zj_order')->where($map)->field('*')->select();
|
|
|
// $whole = $data[0]['whole'];
|
|
|
// $whole_num = $data[0]['whole_num'];
|
|
|
// $total = $whole - $whole_num;
|
|
|
print_r($data->toArray());
|
|
|
$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;
|
|
|
}
|
...
|
...
|
|