AI Assistant 6 months ago
parent
commit
1b6ff96aa3
1 changed files with 6 additions and 1 deletions
  1. 6 1
      app/Module/Farm/Commands/UpdateCropGrowthCommand.php

+ 6 - 1
app/Module/Farm/Commands/UpdateCropGrowthCommand.php

@@ -62,7 +62,12 @@ class UpdateCropGrowthCommand extends Command
                     $updatedCount++;
                     // 重新获取作物信息以显示更新后的状态
                     $crop->refresh();
-                    $this->info("作物 ID: {$crop->id}, 用户 ID: {$userId}, 阶段: {$oldStage} -> {$crop->growth_stage}");
+
+                    // 获取阶段名称用于显示
+                    $oldStageName = GROWTH_STAGE::getName($oldStage->value);
+                    $newStageName = GROWTH_STAGE::getName($crop->growth_stage->value);
+
+                    $this->info("作物 ID: {$crop->id}, 用户 ID: {$userId}, 阶段: {$oldStageName} -> {$newStageName}");
                 }
             }