...
|
...
|
@@ -399,7 +399,7 @@ class Business extends Base |
|
|
//当前店铺下的代理人,及代理人的推广数量,并且是成功购买的数量
|
|
|
$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){
|
|
|
$ids = Db::name('user')->where(['pid'=>$item['user_id']])->column("id");
|
|
|
$count = Db::name('verification_order')->where(['user_id'=>['in',$ids],'type'=>['in',['1','4']]])->field("user_id")->group("user_id")->select();
|
|
|
$count = Db::name('verification_order')->where(['user_id'=>['in',$ids],'type'=>['in',['1','4']]])->field("user_id")->select();
|
|
|
$item['count'] = count($count);
|
|
|
$item['count_id'] = $count;
|
|
|
return $item;
|
...
|
...
|
@@ -433,7 +433,7 @@ class Business extends Base |
|
|
//当前店铺下的代理人,及代理人的推广数量
|
|
|
$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){
|
|
|
$ids = Db::name('user')->where(['pid'=>$item['user_id']])->column("id");
|
|
|
$count = Db::name('verification_order')->where(['user_id'=>['in',$ids],'type'=>['in',['1','4']]])->field("user_id")->group("user_id")->select();
|
|
|
$count = Db::name('verification_order')->where(['user_id'=>['in',$ids],'type'=>['in',['1','4']]])->field("user_id")->select();
|
|
|
$item['count'] = count($count);
|
|
|
$item['count_id'] = $count;
|
|
|
return $item;
|
...
|
...
|
|