field($field); if (empty($where) === false) { $result = $result->where($where); } $result = $result->limit($offset, $limit)->order('time_line', 'desc')->select(); return $result; }//end selectChatLog() /** * 数据总数 * * @access public * @param mixed $where 条件 * @return array 返回类型 */ public function countChatLog($where=[]) { $result = $this; if (empty($where) === false) { $result = $result->where($where); } $result = $result->count(); return $result; }//end countChatLog() /** * 用户数据筛选 * * @access public * @param mixed $field 字段 * @param mixed $offset 分页开始 * @param mixed $limit 分页大小 * @param mixed $where 条件 * @param mixed $whereOr 条件 * @return array 返回类型 */ public function userChatLog($field, $where, $whereOr, $offset, $limit) { $result = $this ->field($field) ->where($where) ->whereOr($whereOr) ->limit($offset, $limit) ->order('time_line', 'desc') ->select(); return $result; }//end userChatLog() /** * 用户数据总数 * * @access public * @param mixed $where 条件. * @param mixed $whereOr 条件. * @return array 返回类型 */ public function userChatLogCount($where, $whereOr) { $result = $this->where($where)->whereOr($whereOr)->count(); return $result; }//end userChatLogCount() }