From 7a8a6ed462e472ec785d3ccca03208a76060c2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Tue, 30 Dec 2025 18:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Tasks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/api/model/Tasks.php b/application/api/model/Tasks.php index 4c447c59..572be23c 100644 --- a/application/api/model/Tasks.php +++ b/application/api/model/Tasks.php @@ -149,7 +149,7 @@ class Tasks extends Model ->whereTime('createtime', 'today') ->find(); }else{ - if($user_ids && $v['task_type'] == 1 && count($user_ids)>1){ + if(isset($user_ids) && $v['task_type'] == 1 && count($user_ids)>1){ $user_daily_tasks = Db::name('vs_tasks_user_daily')->whereIn('user_id',$user_ids)->where('task_id',$v['task_id'])->find(); }else{ $user_daily_tasks = Db::name('vs_tasks_user_daily')->where('user_id',$user_id)->where('task_id',$v['task_id'])->find(); @@ -487,7 +487,7 @@ class Tasks extends Model if($task_info['task_type']==2){ $user_daily_tasks = Db::name('vs_tasks_user_daily')->where('user_id',$user_id)->where('task_id',$task_id)->whereTime('createtime', 'today')->find(); }else{ - if($task_info['task_type'] == 1 && count($user_ids)>1){ + if(isset($user_ids) && $task_info['task_type'] == 1 && count($user_ids)>1){ $user_daily_tasks = Db::name('vs_tasks_user_daily')->whereIn('user_id',$user_ids)->where('task_id',$task_id)->find(); }else{ $user_daily_tasks = Db::name('vs_tasks_user_daily')->where('user_id',$user_id)->where('task_id',$task_id)->find();