正在显示
1 个修改的文件
包含
6 行增加
和
7 行删除
@@ -97,7 +97,7 @@ class AdminIndexController extends AdminBaseController | @@ -97,7 +97,7 @@ class AdminIndexController extends AdminBaseController | ||
97 | if ($role == 1) { | 97 | if ($role == 1) { |
98 | $map = [ | 98 | $map = [ |
99 | 'uid' => ['eq', $item['id']], | 99 | 'uid' => ['eq', $item['id']], |
100 | - 'pay_type' => ['eq', 3], | 100 | + 'pay_type' => ['eq', 2], |
101 | 'step' => ['neq', 1] | 101 | 'step' => ['neq', 1] |
102 | ]; | 102 | ]; |
103 | $data = Db::name('zj_order')->where($map)->field('sum(whole) as whole,sum(whole_num) as whole_num')->select(); | 103 | $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 | @@ -118,14 +118,13 @@ class AdminIndexController extends AdminBaseController | ||
118 | } | 118 | } |
119 | $map = [ | 119 | $map = [ |
120 | 'uid' => ['in', $son_str], | 120 | 'uid' => ['in', $son_str], |
121 | - 'pay_type' => ['eq', 3], | 121 | + 'pay_type' => ['eq', 2], |
122 | 'step' => ['neq', 1] | 122 | 'step' => ['neq', 1] |
123 | ]; | 123 | ]; |
124 | - $data = Db::name('zj_order')->where($map)->field('*')->select(); | ||
125 | -// $whole = $data[0]['whole']; | ||
126 | -// $whole_num = $data[0]['whole_num']; | ||
127 | -// $total = $whole - $whole_num; | ||
128 | - print_r($data->toArray()); | 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 | } |
-
请 注册 或 登录 后发表评论