修复:运营中心 某个身份的上级不存在时,查询错误导致运营中心菜单显示错误

This commit is contained in:
wuhui_zzw 2024-05-31 10:26:44 +08:00
parent 36dba452c5
commit 4096b9ae36
1 changed files with 4 additions and 0 deletions

View File

@ -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'];