正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
@@ -396,9 +396,10 @@ class Business extends Base | @@ -396,9 +396,10 @@ class Business extends Base | ||
396 | //验证 | 396 | //验证 |
397 | //$r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find(); | 397 | //$r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find(); |
398 | //if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); } | 398 | //if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); } |
399 | - //当前店铺下的代理人,及代理人的推广数量 | ||
400 | - $rows = Db::name('_verification_staff')->where(['verification_store_id'=>$store_id,'type'=>['in',['0','1','3']]])->field("name,0 as count,user_id")->paginate(1000)->each(function($item){ | ||
401 | - $item['count'] = Db::name('user')->where(['pid'=>$item['user_id']])->count(); | 399 | + //当前店铺下的代理人,及代理人的推广数量,并且是成功购买的数量 |
400 | + $rows = Db::name('verification_staff')->where(['verification_store_id'=>$store_id,'type'=>['in',['0','1','3']]])->field("name,0 as count,user_id")->paginate(1000)->each(function($item){ | ||
401 | + $ids = Db::name('user')->where(['pid'=>$item['user_id']])->column("id"); | ||
402 | + $item['count'] = Db::name('verification_order')->where(['user'=>['in',$ids],'type'=>['in',['1','4']]])->count(); | ||
402 | return $item; | 403 | return $item; |
403 | })->toArray(); | 404 | })->toArray(); |
404 | 405 |
-
请 注册 或 登录 后发表评论