fix: 邮件通知消息未读对象可能会出错的情况

This commit is contained in:
kuaifan 2022-05-20 23:51:54 +08:00
parent 68a7b55320
commit 4f5dce282b

View File

@ -181,6 +181,7 @@ class EmailNoticeTask extends AbstractTask
->join('web_socket_dialog_msg_reads as r', 'web_socket_dialog_msgs.id', '=', 'r.msg_id')
->whereNull("r.read_at")
->where("r.email", 0)
->where("r.userid", $userid)
->where("web_socket_dialog_msgs.dialog_type", $dialogType)
->take(100)
->get();