From 4096b9ae366544ef6a824536fc1815b02280c3d2 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Fri, 31 May 2024 10:26:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=20=E6=9F=90=E4=B8=AA=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E7=9A=84=E4=B8=8A=E7=BA=A7=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=BF=90=E8=90=A5=E4=B8=AD=E5=BF=83=E8=8F=9C=E5=8D=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Agent.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controller/api/Agent.php b/app/controller/api/Agent.php index 4414b68..8ee3b16 100644 --- a/app/controller/api/Agent.php +++ b/app/controller/api/Agent.php @@ -303,6 +303,8 @@ class Agent extends BaseController{ // 判断:是否为省公司发起人信息 是则直接使用,否则查询省公司发起人信息 if($v['agent_type'] == 2) $currentUseInfo = $v; else $currentUseInfo = $this->repository->getSearchModel(['id'=>$v['pid'],'agent_type'=>2])->findOrEmpty()->toArray(); + // 信息为空 + if(!$currentUseInfo) continue; // 判断:当前省公司发起人信息是否已经存在,不存在添加 if(!in_array($currentUseInfo['id'],array_column($newProvince,'id'))){ $currentUseInfo['agent_type_list'][$v['agent_type']] = $v['agent_type_text']; @@ -323,6 +325,8 @@ class Agent extends BaseController{ // 判断:是否为区县运营商信息 是则直接使用,否则查询区县运营商信息 if($v['agent_type'] == 5) $currentUseInfo = $v; else $currentUseInfo = $this->repository->getSearchModel(['id'=>$v['pid'],'agent_type'=>5])->findOrEmpty()->toArray(); + // 信息为空 + if(!$currentUseInfo) continue; // 判断:当前省公司发起人信息是否已经存在,不存在添加 if(!in_array($currentUseInfo['id'],array_column($newCounty,'id'))){ $currentUseInfo['agent_type_list'][$v['agent_type']] = $v['agent_type_text'];