FeedModel::getFollowingList PHP Method

getFollowingList() public method

获取指定用户所关注人的分享列表
public getFollowingList ( array $map, integer $uid, string $app, integer $type, integer $limit = 10 ) : array
$map array 查询条件
$uid integer 用户ID
$app string 应用名称
$type integer 应用类型
$limit integer 结果集数目,默认为10
return array 指定用户所关注人的分享列表
    public function getFollowingList($map, $uid, $app, $type, $limit = 10)
    {
        // 读取列表
        $map['_string'] = "uid IN (SELECT fid FROM {$this->tablePrefix}user_follow WHERE uid={$uid}) OR uid={$uid}";
        !empty($app) && ($map['app'] = $app);
        !empty($type) && ($map['type'] = $type);
        if ($map['type'] == 'post') {
            unset($map['type']);
            $map['is_repost'] = 0;
        }
        $feedlist = $this->field('feed_id')->where($map)->order('publish_time DESC')->findPage($limit);
        if (!$feedlist) {
            $this->error = L('PUBLIC_INFO_GET_FAIL');
            // 获取信息失败
            return false;
        }
        $feed_ids = getSubByKey($feedlist['data'], 'feed_id');
        $feedlist['data'] = $this->getFeeds($feed_ids);
        return $feedlist;
    }