作者 李涵
1 个管道 的构建 通过 耗费 0 秒

合并分支 'li' 到 'master'

赠送积分和角色管理



查看合并请求 !637
@@ -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 }