FeedModel::getList PHP Method

getList() public method

获取分享列表
public getList ( array $map, integer $limit = 10, string $order = null, $max = null ) : array
$map array 查询条件
$limit integer 结果集数目,默认为10
$order string 排序字段
return array 分享列表数据
    public function getList($map, $limit = 10, $order = null, $max = null)
    {
        $order = !empty($order) ? $order : 'feed_id DESC';
        $feedlist = $this->field('feed_id')->where($map)->order($order);
        if ($max > 0) {
            $feedlist = $this->findPage($limit, $max);
        } else {
            $feedlist = $this->findPage($limit);
        }
        $feed_ids = getSubByKey($feedlist['data'], 'feed_id');
        $feedlist['data'] = $this->getFeeds($feed_ids);
        return $feedlist;
    }