123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- /**
- *
- * @author: xaboy<365615158@qq.com>
- * @day: 2017/11/02
- */
- namespace app\admin\model\auction;
- use crmeb\traits\ModelTrait;
- use crmeb\basic\BaseModel;
- /**
- * 场馆 Model
- * Class WechatNews
- * @package app\admin\model\wechat
- */
- class AuctionApply extends BaseModel
- {
- use ModelTrait;
- protected $pk = 'id';
- protected $name = 'auction_apply';
- protected $autoWriteTimestamp = true;
- public static function list($where)
- {
- $model = self::alias('a')
- ->field('a.*, u.nickname,u.avatar as image')
- ->order('a.id DESC')
- ->leftJoin('user u', 'a.uid = u.uid');
- if ($where['auction']) $model->where('u.nickname', 'like', '%'.$where['auction'].'%');
- $data['count'] = $model->count();
- if ($where['page'] && $where['limit']){
- $model->page($where['page'], $where['limit']);
- }else{
- $model->page(20, 1);
- }
- $list = $model->select();
- $data['data'] = empty($list) ? [] : $list->toArray();
- return $data;
- }
- }
|