作者 郭文星

'123'

@@ -424,10 +424,10 @@ class Business extends Base @@ -424,10 +424,10 @@ class Business extends Base
424 //参数 424 //参数
425 $param = request()->param(); 425 $param = request()->param();
426 //验证 426 //验证
427 - //if(empty($param['date'])){$param['date'] = date("Y-m-d"); }  
428 - //$dates = [strtotime($param['date']." 00:00:00"),strtotime($param['date']." 23:59:59")];  
429 - $r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();  
430 - if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); } 427 + if(empty($param['date'])){$param['date'] = date("Y-m-d"); }
  428 + $dates = [strtotime($param['date']." 00:00:00"),strtotime($param['date']." 23:59:59")];
  429 + //$r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();
  430 + //if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); }
431 //当前店铺下的代理人,及代理人的推广数量 431 //当前店铺下的代理人,及代理人的推广数量
432 $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){ 432 $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){
433 //一级统计 433 //一级统计
@@ -466,8 +466,8 @@ class Business extends Base @@ -466,8 +466,8 @@ class Business extends Base
466 //参数 466 //参数
467 $param = request()->param(); 467 $param = request()->param();
468 //验证 468 //验证
469 - $r1 = Db::name('verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();  
470 - if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); } 469 + //$r1 = Db::name('verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();
  470 + //if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); }
471 //当前店铺下的佣金发放记录 471 //当前店铺下的佣金发放记录
472 $rows = Db::name('verification_brokerage_record a') 472 $rows = Db::name('verification_brokerage_record a')
473 ->join("user b","a.send_user_id = b.id","left") 473 ->join("user b","a.send_user_id = b.id","left")