From 2aab1dfbed4e7c86f6d268f73e19c18a09bcc500 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 9 Jan 2024 15:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/Model/Task.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/common/Model/Task.php b/application/common/Model/Task.php index 2e2b01f..f8dc222 100755 --- a/application/common/Model/Task.php +++ b/application/common/Model/Task.php @@ -41,10 +41,16 @@ class Task extends CommonModel $task['exchange_info']=null; $task['copied_info']=null; foreach($exchange_list as $k=>$v){ - $task['exchange_info'][]=Member::where(['code'=>$v])->field('name,code,avatar')->find(); + $find=Member::where(['code'=>$v])->field('name,code,avatar')->find(); + if($find){ + $task['exchange_info'][]=$find; + } } foreach($copied_list as $k=>$v){ - $task['copied_info'][]=Member::where(['code'=>$v])->field('name,code,avatar')->find(); + $find=Member::where(['code'=>$v])->field('name,code,avatar')->find(); + if($find){ + $task['copied_info'][]=$find; + } } if($task['department_liaison']){ $task['liasion_info']=MemberAccount::where(['code'=>$task['department_liaison']])->field('name,member_code as code,avatar')->find();