作者 郭文星

123

@@ -397,7 +397,7 @@ class Business extends Base @@ -397,7 +397,7 @@ class Business extends Base
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 //当前店铺下的代理人,及代理人的推广数量 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(20)->each(function($item){ 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(); 401 $item['count'] = Db::name('user')->where(['pid'=>$item['user_id']])->count();
402 return $item; 402 return $item;
403 })->toArray(); 403 })->toArray();
@@ -432,7 +432,7 @@ class Business extends Base @@ -432,7 +432,7 @@ class Business extends Base
432 //$r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find(); 432 //$r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();
433 //if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); } 433 //if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); }
434 //当前店铺下的代理人,及代理人的推广数量 434 //当前店铺下的代理人,及代理人的推广数量
435 - $rows = Db::name('_verification_staff')->where(['verification_store_id'=>$store_id,'type'=>['in',['0','1','3']]])->field("name,0 as count,user_id")->paginate(20)->each(function($item) use ($dates){ 435 + $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) use ($dates){
436 //一级统计 436 //一级统计
437 $count_1 = Db::name('user')->where(['pid'=>$item['user_id'],'updatetime'=>['between',$dates]])->field("id")->select(); 437 $count_1 = Db::name('user')->where(['pid'=>$item['user_id'],'updatetime'=>['between',$dates]])->field("id")->select();
438 $item['count_1'] = count($count_1); 438 $item['count_1'] = count($count_1);