AuctionProduct.php 836 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. *
  4. * @author: xaboy<365615158@qq.com>
  5. * @day: 2017/11/02
  6. */
  7. namespace app\admin\model\auction;
  8. use crmeb\traits\ModelTrait;
  9. use crmeb\basic\BaseModel;
  10. /**
  11. * 图文管理 Model
  12. * Class WechatNews
  13. * @package app\admin\model\wechat
  14. */
  15. class AuctionProduct extends BaseModel
  16. {
  17. use ModelTrait;
  18. protected $pk = 'id';
  19. protected $name = 'auction_product';
  20. public static function list($where)
  21. {
  22. self::alias('a')
  23. ->field('a.*, u.id,u.nickname')
  24. ->join('user u', 'a.uid = u.id');
  25. if ($where['page'] && $where['limit']){
  26. self::page($where['page'], $where['limit']);
  27. }else{
  28. self::page(20, 1);
  29. }
  30. $data['count'] = self::count();
  31. $data['data'] = self::select()->toArray();
  32. return $data;
  33. }
  34. }