正在显示
1 个修改的文件
包含
16 行增加
和
2 行删除
| @@ -377,7 +377,12 @@ class Business extends Base | @@ -377,7 +377,12 @@ class Business extends Base | ||
| 377 | public function selectPerformance(){ | 377 | public function selectPerformance(){ |
| 378 | $store_id=$this->store_id; | 378 | $store_id=$this->store_id; |
| 379 | $user_id = $this->auth->id; | 379 | $user_id = $this->auth->id; |
| 380 | - | 380 | + $where["verification_store_id"] = ["=", $this->store_id]; |
| 381 | + $activity=Db::name('verification_activity') | ||
| 382 | + ->alias('a') | ||
| 383 | + ->join('verification_store b','a.verification_store_id=b.id') | ||
| 384 | + ->field('a.*,b.address,b.name,b.phone') | ||
| 385 | + ->where($where)->find(); | ||
| 381 | //验证 | 386 | //验证 |
| 382 | $r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find(); | 387 | $r1 = Db::name('_verification_staff')->where(['user_id'=>$user_id,'type'=>'0','verification_store_id'=>$store_id])->find(); |
| 383 | if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); } | 388 | if(empty($r1)){ return $this->error('仅店长可查自己店铺信息'); } |
| @@ -386,6 +391,8 @@ class Business extends Base | @@ -386,6 +391,8 @@ class Business extends Base | ||
| 386 | $item['count'] = Db::name('user')->where(['pid'=>$item['user_id']])->count(); | 391 | $item['count'] = Db::name('user')->where(['pid'=>$item['user_id']])->count(); |
| 387 | return $item; | 392 | return $item; |
| 388 | }); | 393 | }); |
| 394 | + $rows['activity_name']=$activity['title']; | ||
| 395 | + $rows['staff_name']=$activity['name']; | ||
| 389 | $this->success("查询成功",$rows); | 396 | $this->success("查询成功",$rows); |
| 390 | } | 397 | } |
| 391 | 398 | ||
| @@ -398,7 +405,12 @@ class Business extends Base | @@ -398,7 +405,12 @@ class Business extends Base | ||
| 398 | public function select_performance_all(){ | 405 | public function select_performance_all(){ |
| 399 | $store_id=$this->store_id; | 406 | $store_id=$this->store_id; |
| 400 | $user_id = $this->auth->id; | 407 | $user_id = $this->auth->id; |
| 401 | - | 408 | + $where["verification_store_id"] = ["=", $this->store_id]; |
| 409 | + $activity=Db::name('verification_activity') | ||
| 410 | + ->alias('a') | ||
| 411 | + ->join('verification_store b','a.verification_store_id=b.id') | ||
| 412 | + ->field('a.*,b.address,b.name,b.phone') | ||
| 413 | + ->where($where)->find(); | ||
| 402 | //参数 | 414 | //参数 |
| 403 | $param = request()->param(); | 415 | $param = request()->param(); |
| 404 | //验证 | 416 | //验证 |
| @@ -421,6 +433,8 @@ class Business extends Base | @@ -421,6 +433,8 @@ class Business extends Base | ||
| 421 | $item['count_0'] = $item['count_1']+$item['count_2']; | 433 | $item['count_0'] = $item['count_1']+$item['count_2']; |
| 422 | return $item; | 434 | return $item; |
| 423 | }); | 435 | }); |
| 436 | + $rows['activity_name']=$activity['title']; | ||
| 437 | + $rows['staff_name']=$activity['name']; | ||
| 424 | $this->success("查询成功",$rows); | 438 | $this->success("查询成功",$rows); |
| 425 | } | 439 | } |
| 426 | 440 |
-
请 注册 或 登录 后发表评论