From 857e36c8384170fa438dc43d7470391eda38606c Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Mon, 29 Jan 2024 14:33:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2=20-=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E4=BB=85=E6=98=BE=E7=A4=BA=E6=8B=A5=E6=9C=89=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E6=9D=83=E9=99=90=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/marketing/AgentDao.php | 4 ++++ app/controller/admin/marketing/Agent.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/common/dao/marketing/AgentDao.php b/app/common/dao/marketing/AgentDao.php index 60cd5fd..200385f 100644 --- a/app/common/dao/marketing/AgentDao.php +++ b/app/common/dao/marketing/AgentDao.php @@ -38,6 +38,10 @@ class AgentDao extends BaseDao{ ->when(isset($params['agent_type']) && $params['agent_type'] !== '',function($query) use ($params){ $query->where('agent_type', (int)$params['agent_type']); }) + ->when(isset($params['is_invite_supplier']) && $params['is_invite_supplier'] !== '',function($query) use ($params){ + // 仅获取拥有【供应商】邀请权限的代理人员 类型:1=发起人,2=省公司,3=省合伙人(外勤),4=省合伙人(内勤),5=区县运营商 + $query->whereIn('agent_type',[1,2,3,4,5]); + }) ->with([ 'user' => function($query){ $query->field('uid,nickname,avatar'); diff --git a/app/controller/admin/marketing/Agent.php b/app/controller/admin/marketing/Agent.php index fd2d71e..343901f 100644 --- a/app/controller/admin/marketing/Agent.php +++ b/app/controller/admin/marketing/Agent.php @@ -17,7 +17,7 @@ class Agent extends BaseController{ */ public function agentList(){ [$page, $limit] = $this->getPage(); - $params = $this->request->params(['uid','agent_type','contact_name','contact_phone']); + $params = $this->request->params(['uid','agent_type','contact_name','contact_phone','is_invite_supplier']); $data = app()->make(AgentRepository::class)->getList((array)$params,(int)$page,(int)$limit); return app('json')->success($data);