From aa5bf5fd2c124b786367dce18f3ed62d5197efeb Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Mon, 13 Oct 2025 16:53:11 +0800 Subject: [PATCH] update --- app/Console/Commands/UpdateCourseSignDoor.php | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 app/Console/Commands/UpdateCourseSignDoor.php diff --git a/app/Console/Commands/UpdateCourseSignDoor.php b/app/Console/Commands/UpdateCourseSignDoor.php new file mode 100755 index 0000000..ef8c938 --- /dev/null +++ b/app/Console/Commands/UpdateCourseSignDoor.php @@ -0,0 +1,64 @@ +whereIn('id', [97, 99]) + ->get(); + foreach ($courses as $course) { + $courseSigns = CourseSign::where('course_id', $course->id)->where('status', 1)->get(); + foreach ($courseSigns as $courseSign) { + dispatch((new SendCourseDoor($courseSign))); + $this->info('更新学员' . $courseSign->user->name . '的门禁权限'); + } + } + return $this->info('更新完成'); + } + + +}