Пример #1
0
 public static function actionMyUnreadCount()
 {
     $p_where = array();
     $p_where['id'] = W2HttpRequest::getRequestInt('id', null, false, false);
     $p_where['status'] = STATUS_NORMAL;
     //默认列表页只筛选STATUS_NORMAL状态的数据
     $p_where['joinList'] = array();
     $p_where['joinList'][] = array('relationMessageUser t2', array('t2.msgID = t1.id', 't2.userID' => Utility::getCurrentUserID(), 't2.readStatus' => READ_STATUS::UNREAD));
     $tmpResult = MessageHandler::countAll($p_where);
     return Utility::getArrayForResults(RUNTIME_CODE_OK, '', $tmpResult);
 }