作者 刘朕
1 个管道 的构建 通过 耗费 1 秒

后台订单列表优化

... ... @@ -31,16 +31,18 @@ class UsersController extends AdminBaseController{
public function over_count() {
$income = Db::name('money_income')->select();
$income = collection($income)->toArray();
$ids = [];
$ids = $user_ids = [];
$money = 0;
foreach ($income as $k=>$v) {
$indent = Db::name('indent')->where('id',$v['indent_id'])->find();
if(!$indent) {
$ids[] = $v['id'];
$user_ids[] = $v['uid'];
$money += $v['money'];
}
}
echo implode(',',$ids).'<br/>';
echo implode(',',$user_ids).'<br/>';
echo $money;
}
... ...