pageList($condition, $field, $order, $page, $page_size, $alias, $join); return $this->success($list); } /** * Common: 用户是否存在未读消息 * Author: wu-hui * Time: 2023/04/04 10:31 * @param $memberId * @return bool */ public function isHasUnread($memberId){ // 条件生成 $condition = [ ['a.member_id', '=', $memberId ], ['a.is_see', '=', 0 ], ['mc.type', '<>', 4 ], ]; // 表关联 $join = [ ['message_center mc', 'mc.id = a.message_center_id', 'left'], ]; $isHas = model('message_center_read')->getCount($condition, 'a.id', 'a', $join); return (int)$isHas; } }