正在显示
1 个修改的文件
包含
6 行增加
和
7 行删除
@@ -109,8 +109,8 @@ class AdminIndexController extends AdminBaseController | @@ -109,8 +109,8 @@ class AdminIndexController extends AdminBaseController | ||
109 | $son_arr = Db::name('user')->where(['parent_id' => $item['id']])->field('id')->select()->toArray(); | 109 | $son_arr = Db::name('user')->where(['parent_id' => $item['id']])->field('id')->select()->toArray(); |
110 | if (!empty($son_arr)) { | 110 | if (!empty($son_arr)) { |
111 | $son_str = ''; | 111 | $son_str = ''; |
112 | - foreach ($son_arr as $k => $v) { | ||
113 | - if ($k == count($son_arr) - 1) { | 112 | + foreach ($son_arr as $key => $v) { |
113 | + if ($key == count($son_arr) - 1) { | ||
114 | $son_str .= $v['id']; | 114 | $son_str .= $v['id']; |
115 | } else { | 115 | } else { |
116 | $son_str .= $v['id'] . ','; | 116 | $son_str .= $v['id'] . ','; |
@@ -121,11 +121,10 @@ class AdminIndexController extends AdminBaseController | @@ -121,11 +121,10 @@ class AdminIndexController extends AdminBaseController | ||
121 | 'pay_type' => ['eq', 3], | 121 | 'pay_type' => ['eq', 3], |
122 | 'step' => ['neq', 1] | 122 | 'step' => ['neq', 1] |
123 | ]; | 123 | ]; |
124 | - //$data = Db::name('zj_order')->where($map)->field('sum(whole) as whole,sum(whole_num) as whole_num')->select(); | ||
125 | -// $whole = $data[0]['whole']; | ||
126 | -// $whole_num = $data[0]['whole_num']; | ||
127 | -// $total = $whole - $whole_num; | ||
128 | - $total = '???'; | 124 | + $data = Db::name('zj_order')->where($map)->field('sum(whole) as whole,sum(whole_num) as whole_num')->select(); |
125 | + $whole = $data[0]['whole']; | ||
126 | + $whole_num = $data[0]['whole_num']; | ||
127 | + $total = $whole - $whole_num; | ||
129 | } else { | 128 | } else { |
130 | $total = 0; | 129 | $total = 0; |
131 | } | 130 | } |
-
请 注册 或 登录 后发表评论