fix: ticket reply_status semantics, N+1 query, and admin reply auto-reopen

This commit is contained in:
xboard
2026-04-18 16:40:21 +08:00
parent da8b5018ea
commit 360684245e
6 changed files with 74 additions and 34 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class CheckTicket extends Command
{
Ticket::where('status', 0)
->where('updated_at', '<=', time() - 24 * 3600)
->where('reply_status', 0)
->where('reply_status', Ticket::REPLY_STATUS_REPLIED)
->lazyById(200)
->each(function ($ticket) {
if ($ticket->user_id === $ticket->last_reply_user_id) return;