diff --git a/extend/base/admin/controller/NoticeBase.php b/extend/base/admin/controller/NoticeBase.php index 2d63dfb..169ce79 100644 --- a/extend/base/admin/controller/NoticeBase.php +++ b/extend/base/admin/controller/NoticeBase.php @@ -61,15 +61,15 @@ class NoticeBase extends AdminController ->withJoin('notice', 'LEFT') ->where('system_notice_target.admin_id', $adminId) ->where('system_notice_target.channel', NoticeService::CHANNEL_INMAIL) - // 软删通知不进个人域(管理页删除后此处消失) - ->where('system_notice.delete_time', 0) + // 软删通知不进个人域(管理页删除后此处消失);别名 notice 为 withJoin 的关系名 + ->where('notice.delete_time', 0) ->where($where) ->count(); $list = $this->model ->withJoin('notice', 'LEFT') ->where('system_notice_target.admin_id', $adminId) ->where('system_notice_target.channel', NoticeService::CHANNEL_INMAIL) - ->where('system_notice.delete_time', 0) + ->where('notice.delete_time', 0) ->where($where) ->page($page, $limit) ->order($this->sort) @@ -99,7 +99,7 @@ class NoticeBase extends AdminController ->where('system_notice_target.id', (int) $id) ->where('system_notice_target.admin_id', $adminId) // 软删通知不进个人域(管理页删除后详情不可打开) - ->where('system_notice.delete_time', 0) + ->where('notice.delete_time', 0) ->find(); if (empty($row)) { $this->error('消息不存在或无权查看');