fix(notice): 发送事务包裹与软删过滤加固

This commit is contained in:
augushong
2026-10-12 14:39:17 +00:00
parent 710ce97473
commit 77e75fcc0b
3 changed files with 76 additions and 21 deletions

View File

@@ -61,12 +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)
->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($where)
->page($page, $limit)
->order($this->sort)
@@ -95,6 +98,8 @@ class NoticeBase extends AdminController
->withJoin('notice', 'LEFT')
->where('system_notice_target.id', (int) $id)
->where('system_notice_target.admin_id', $adminId)
// 软删通知不进个人域(管理页删除后详情不可打开)
->where('system_notice.delete_time', 0)
->find();
if (empty($row)) {
$this->error('消息不存在或无权查看');