Update Data.php

This commit is contained in:
邹景立 2021-03-29 10:55:17 +08:00
parent c63875b685
commit 61ece97e60

View File

@ -34,7 +34,7 @@ class Data extends Controller
$query = $this->_query('DataBaseMessage')->where(['status' => 1, 'deleted' => 0]);
$result = $query->equal('id')->order('sort desc,id desc')->page(true, false, false, 20);
if (($id = input('id')) > 0) {
$this->app->db->name('DataBaseNotify')->where(['id' => $id])->inc('num_read')->update();
$this->app->db->name('DataBaseMessage')->where(['id' => $id])->inc('num_read')->update();
}
$this->success('获取系统通知数据', $result);
}