1234567891011121314151617181920212223242526 |
- <?php
- namespace app\index\model\activity;
- use app\index\model\BaseModel;
- class CollectionModel extends BaseModel
- {
- protected $table='collection';
- protected $connection = 'db_activity';
- /**
- * 用户活动收藏
- * @param $where
- * @param string $order
- * @param int $limit
- * @return array|false|\PDOStatement|string|\think\Model
- */
- public function getActivityCollection($where,$order='add_time desc',$limit=50){
- return $this->field('collection.*,activity.activity_img,activity.title,activity.show_param')
- ->join('activity','activity.activity_id=collection.activity_id','LEFT')
- ->where($where)
- ->order($order)
- ->limit($limit)->select();
- }
- }
|