diff --git a/app/Console/Commands/SendEmail.php b/app/Console/Commands/SendEmail.php index 80739c8..2d3d198 100755 --- a/app/Console/Commands/SendEmail.php +++ b/app/Console/Commands/SendEmail.php @@ -69,6 +69,8 @@ class SendEmail extends Command $recordUser->send_time = date('Y-m-d H:i:s'); $recordUser->save(); } + $records->send_time = date('Y-m-d H:i:s'); + $records->save(); } return $this->info('更新完成'); } diff --git a/database/migrations/2025_07_04_092917_create_email_records_table.php b/database/migrations/2025_07_04_092917_create_email_records_table.php index c3bb6a2..6820764 100644 --- a/database/migrations/2025_07_04_092917_create_email_records_table.php +++ b/database/migrations/2025_07_04_092917_create_email_records_table.php @@ -22,6 +22,8 @@ return new class extends Migration { $table->integer('email_template_id')->nullable()->comment('邮件模版id'); // 状态 $table->tinyInteger('status')->nullable()->default(0)->comment('状态0:待处理1:已处理'); + // 发送时间 + $table->dateTime('send_time')->nullable()->comment('发送时间'); $table->timestamps(); $table->softDeletes(); });