新增未读消息数
This commit is contained in:
parent
f41b2e7da9
commit
b3828d2f47
|
@ -533,4 +533,16 @@ class Common extends ApiController
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//未读消息统计
|
||||
public function msg_count()
|
||||
{
|
||||
$admin_id = JWT_UID;
|
||||
$msg_map[] = ['to_uid', '=', $admin_id];
|
||||
$msg_map[] = ['read_time', '=', 0];
|
||||
$msg_map[] = ['status', '=', 1];
|
||||
$msg_count = Db::name('Message')->where($msg_map)->count();
|
||||
$statistics['msg_num'] = $msg_count;
|
||||
$this->apiSuccess('获取成功', $statistics);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue