EventModel::getHotList PHP Метод

getHotList() публичный Метод

getHotList 推荐列表
public getHotList ( )
    public function getHotList()
    {
        $opts_ids = self::factoryModel('opts')->field('id')->where('isHot=1')->limit(5)->findAll();
        foreach ($opts_ids as &$v) {
            $v = $v['id'];
        }
        $event_map['optsId'] = array('in', $opts_ids);
        $event_ids = $this->where($event_map)->findAll();
        $typeDao = self::factoryModel('type');
        foreach ($event_ids as &$v) {
            $v['type'] = $typeDao->getTypeName($v['type']);
            $v['address'] = getShort($v['address'], 6);
            $v['coverId'] = getCover($v['coverId'], 100, 100);
        }
        return $event_ids;
    }