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