diff --git a/application/api/model/Tasks.php b/application/api/model/Tasks.php index 97da9db5..9910b2c9 100644 --- a/application/api/model/Tasks.php +++ b/application/api/model/Tasks.php @@ -501,13 +501,19 @@ class Tasks extends Model $ext = $user_daily_tasks['ext']; } $current_progress = $user_daily_tasks['current_progress'] + 1; - if($current_progress >= $task_info['target_quantity'] && $user_daily_tasks['ext'] >= 1){ + if($current_progress >= $task_info['target_quantity'] && $ext >= 1){ $is_completed = 1; $completion_time = time(); }else{ $is_completed = 0; $completion_time = null; } + if($current_progress > $task_info['target_quantity']){ + $current_progress = $task_info['target_quantity']; + } + if($ext > 1){ + $ext = 1; + } $reslut = Db::name('vs_tasks_user_daily')->where('id',$user_daily_tasks['id'])->update([ 'current_progress' => $current_progress, 'is_completed'=> $is_completed,