mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-10 13:00:49 +08:00
fix(notice): 个人域软删过滤改用 withJoin 关系别名
This commit is contained in:
@@ -61,15 +61,15 @@ class NoticeBase extends AdminController
|
|||||||
->withJoin('notice', 'LEFT')
|
->withJoin('notice', 'LEFT')
|
||||||
->where('system_notice_target.admin_id', $adminId)
|
->where('system_notice_target.admin_id', $adminId)
|
||||||
->where('system_notice_target.channel', NoticeService::CHANNEL_INMAIL)
|
->where('system_notice_target.channel', NoticeService::CHANNEL_INMAIL)
|
||||||
// 软删通知不进个人域(管理页删除后此处消失)
|
// 软删通知不进个人域(管理页删除后此处消失);别名 notice 为 withJoin 的关系名
|
||||||
->where('system_notice.delete_time', 0)
|
->where('notice.delete_time', 0)
|
||||||
->where($where)
|
->where($where)
|
||||||
->count();
|
->count();
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
->withJoin('notice', 'LEFT')
|
->withJoin('notice', 'LEFT')
|
||||||
->where('system_notice_target.admin_id', $adminId)
|
->where('system_notice_target.admin_id', $adminId)
|
||||||
->where('system_notice_target.channel', NoticeService::CHANNEL_INMAIL)
|
->where('system_notice_target.channel', NoticeService::CHANNEL_INMAIL)
|
||||||
->where('system_notice.delete_time', 0)
|
->where('notice.delete_time', 0)
|
||||||
->where($where)
|
->where($where)
|
||||||
->page($page, $limit)
|
->page($page, $limit)
|
||||||
->order($this->sort)
|
->order($this->sort)
|
||||||
@@ -99,7 +99,7 @@ class NoticeBase extends AdminController
|
|||||||
->where('system_notice_target.id', (int) $id)
|
->where('system_notice_target.id', (int) $id)
|
||||||
->where('system_notice_target.admin_id', $adminId)
|
->where('system_notice_target.admin_id', $adminId)
|
||||||
// 软删通知不进个人域(管理页删除后详情不可打开)
|
// 软删通知不进个人域(管理页删除后详情不可打开)
|
||||||
->where('system_notice.delete_time', 0)
|
->where('notice.delete_time', 0)
|
||||||
->find();
|
->find();
|
||||||
if (empty($row)) {
|
if (empty($row)) {
|
||||||
$this->error('消息不存在或无权查看');
|
$this->error('消息不存在或无权查看');
|
||||||
|
|||||||
Reference in New Issue
Block a user