...
|
...
|
@@ -377,7 +377,12 @@ class Business extends Base |
|
|
public function selectPerformance(){
|
|
|
$store_id=$this->store_id;
|
|
|
$user_id = $this->auth->id;
|
|
|
|
|
|
$where["verification_store_id"] = ["=", $this->store_id];
|
|
|
$activity=Db::name('verification_activity')
|
|
|
->alias('a')
|
|
|
->join('verification_store b','a.verification_store_id=b.id')
|
|
|
->field('a.*,b.address,b.name,b.phone')
|
|
|
->where($where)->find();
|
|
|
//验证
|
|
|
$r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find();
|
|
|
if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); }
|
...
|
...
|
@@ -386,6 +391,8 @@ class Business extends Base |
|
|
$item['count'] = Db::name('user')->where(['pid'=>$item['user_id']])->count();
|
|
|
return $item;
|
|
|
});
|
|
|
$rows['activity_name']=$activity['title'];
|
|
|
$rows['staff_name']=$activity['name'];
|
|
|
$this->success("查询成功",$rows);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -398,7 +405,12 @@ class Business extends Base |
|
|
public function select_performance_all(){
|
|
|
$store_id=$this->store_id;
|
|
|
$user_id = $this->auth->id;
|
|
|
|
|
|
$where["verification_store_id"] = ["=", $this->store_id];
|
|
|
$activity=Db::name('verification_activity')
|
|
|
->alias('a')
|
|
|
->join('verification_store b','a.verification_store_id=b.id')
|
|
|
->field('a.*,b.address,b.name,b.phone')
|
|
|
->where($where)->find();
|
|
|
//参数
|
|
|
$param = request()->param();
|
|
|
//验证
|
...
|
...
|
@@ -421,6 +433,8 @@ class Business extends Base |
|
|
$item['count_0'] = $item['count_1']+$item['count_2'];
|
|
|
return $item;
|
|
|
});
|
|
|
$rows['activity_name']=$activity['title'];
|
|
|
$rows['staff_name']=$activity['name'];
|
|
|
$this->success("查询成功",$rows);
|
|
|
}
|
|
|
|
...
|
...
|
|